Skip to content

Instantly share code, notes, and snippets.

View rkrzr's full-sized avatar

Robert Kreuzer rkrzr

View GitHub Profile
@mthurman
mthurman / README
Created April 3, 2014 21:59
requests + urllib3 + pyopenssl ZeroReturnError
pip install ndg-httpsclient==0.3.2 pyasn1==0.1.7 pyOpenSSL==0.13.1 requests==2.2.1
# with a cert.pem file in the same directory as ssl_server.py
python ssl_server.py
# in another terminal with same virtualenv
python ssl_client.py
anonymous
anonymous / gist:929217
Created April 19, 2011 18:43
| While lhs.exec = \env -> let f = \env' -> case @e.eval env' of
VFalse -> env'
VTrue -> f (@s1.exec env')
in f e
@scvalex
scvalex / README
Created April 30, 2011 02:27
Simple Python script to upload a file to Rackspace CloudFiles
CONFIGURATION
-------------
To setup, simply set your username and API access key in the
cloudfiles.get_conenction call. If you're not using the UK
version of Rackspace, remove the third parameter from the above
call.
EXAMPLE USAGE
-------------
@erikdubbelboer
erikdubbelboer / gscp
Last active January 12, 2018 05:12
Google Cloud shell wrappers
#!/bin/bash
# Copy files from and to Google Compute Engine instances
# Automatically looks up the correct zone and uses ~/.ssh/id_rsa
# Usage
# gscp ./some.file some-instance-name:some-directory
# gscp some-instance-name:some-directory ./some.file
for project in $(gcloud projects list | grep -v PROJECT_ID | cut -d' ' -f 1); do
PROJECT=$project
@kosmikus
kosmikus / TinyServant.hs
Created November 1, 2015 20:30
Implementation of a small Servant-like DSL
{-# LANGUAGE DataKinds, PolyKinds, TypeOperators #-}
{-# LANGUAGE TypeFamilies, FlexibleInstances, ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
module TinyServant where
import Control.Applicative
import GHC.TypeLits
import Text.Read
import Data.Time
@specialunderwear
specialunderwear / babel.sh
Created September 15, 2011 08:58
Install all utf8 locales on ubuntu
#! /bin/sh
cd /usr/share/locales
./install-language-pack eo
./install-language-pack ia
./install-language-pack ie
./install-language-pack io
./install-language-pack vo
./install-language-pack ca
@orclev
orclev / trie.hs
Created February 28, 2012 04:23
Haskell trie implementation
import Data.Maybe
import Control.Monad (liftM)
import Data.List (isPrefixOf)
import qualified Data.Map as M
import qualified Data.Foldable as F
-- | Trie container data type
data Trie a = Trie { value :: Maybe a
, children :: M.Map Char (Trie a) }
deriving (Show)
@vrillusions
vrillusions / _README.mkd
Last active January 24, 2023 16:18
Kickstart for Ubuntu 14.04
@polonskiy
polonskiy / encrypted-git-repo.md
Created February 7, 2018 12:13
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@chris-martin
chris-martin / nixos-from-ubuntu.md
Last active February 17, 2024 18:17
How to install NixOS from an Ubuntu liveCD