Skip to content

Instantly share code, notes, and snippets.

@biovisualize
biovisualize / index.html
Last active February 15, 2017 13:25
Posting gist/blocks to blogger
<!-- Override Gist styling -->
<style type="text/css">
iframe{background-color: #0a0a0a;}
div.gist-syntax {background-color:#0a0a0a!important;}
div.gist {color:#ccc!important;}
span.nt, span.kd, span.k, span.o{color:aliceblue!important;}
.gist .gist-file{border-color:#444!important;}
.gist .gist-file .gist-meta{background-color:#0a0a0a!important;}
</style>
@jakejscott
jakejscott / server.go
Created May 20, 2014 00:53
negroni + httprouter
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/julienschmidt/httprouter"
"net/http"
)
func main() {
#!/usr/bin/env python
import os
import math
from numpy import interp
from random import choice, sample
from time import sleep
from math import log1p
# from colour import Color
/// Phantom type for step 1.
pub enum Step1 {}
/// Phantom type for step 2.
pub enum Step2 {}
/// Contains data we set step by step.
pub struct Data<'a> {
/// 'a' is set in the first step.
a: Option<int>,

Installing

First start and basic setup

Starting weechat

06:18:26 | ___ __ ______________ _____
@gburd
gburd / llvm-update-alternatives
Last active August 8, 2019 02:08 — forked from RaymondKroon/llvm-update-alternatives
LLVM & clang alternatives
#!/usr/bin/env sh
sudo update-alternatives --install \
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.6 200 \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.6 \
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.6 \
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.6 \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.6 \
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.6 \
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.6 \
@algermissen
algermissen / .vimrc
Created April 1, 2018 18:32
My vimrc focussing on Rust development
" HOW TO DO 90% OF WHAT PLUGINS DO (WITH JUST VIM)
" Max Cantor
" NYC Vim Meetup -- August 3, 2016
@zotherstupidguy
zotherstupidguy / ARCHANONIRC.md
Created September 30, 2015 09:20
A Quick Guide for Anonymous and Pseudonymous irc

##Weechat+Arch Linux+Tor ###A Quick Guide for Anonymous and Pseudonymous irc I'm going to assume you know what irc is, and generally how it works. If you haven't gotten that far watch a youtube video and try out some of the commands on an irc webclient somewhere. On Arch Linux to install Weechat you can run sudo pacman -S weechat or you can download it from the official website at http://weechat.net/download/.

You can also install Tor from the official repositories, but If you are going to be making multiple connections to irc networks and you want to keep your identities seperate, I would recommend installing the Tor Browser Bundle as well. This should be done from the Tor website, and you should check the GnuPG signature on the package before running it. The key they have been using to sign the packages with for the months that I have been verifying it i

@dwilliamson
dwilliamson / gist:e9b1ba3c684162c5a931
Last active December 20, 2021 19:38
Workflow for using git subtree on Windows
To include a library as a subtree, follow these steps:
1. Add the project as a remote
git remote add <remote-name> <source-repo>
2. Fetch the remote
git fetch <remote-name>
3. Add the project
git subtree add --prefix "path/to/project" <remote-name> <remote-branch-name> --squash
@maiermic
maiermic / copy-to-docker-volume.sh
Created July 24, 2021 16:11
Copy files to Docker volume
# Usage: copy-to-docker-volume SRC_PATH DEST_VOLUME_NAME [DEST_PATH]
copy-to-docker-volume() {
SRC_PATH=$1
DEST_VOLUME_NAME=$2
DEST_PATH="${3:-}"
# create smallest Docker image possible
echo -e 'FROM scratch\nLABEL empty=""' | docker build -t empty -
# create temporary container to be able to mount volume
CONTAINER_ID=$(docker container create -v my-volume:/data empty cmd)
# copy files to volume