This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HISTFILE=~/.history | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
setopt share_history autocd no_beep | |
bindkey -e | |
zstyle :compinstall filename '/home/picard/.zshrc' | |
zstyle ':completion:*' menu select=2 | |
autoload -Uz compinit && compinit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the name of the branch we are on | |
function git_prompt_info() { | |
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
fi | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
void* run(void *arg) { | |
printf("hello from %d!\n", *(int*)arg); | |
pthread_exit(NULL); | |
} | |
int main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
const int N = 3; | |
const int M = N * N; | |
struct Sudoku { | |
int data[M * M]; | |
int current; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
log() { | |
echo "$@" 1>&2 | |
} | |
create-release() { | |
local url="https://api.github.com/repos/$owner/$repo/releases" | |
local payload="{\"tag_name\":\"v$version\"}" | |
log "post to $url with $payload..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am madbence on github. | |
* I am lennon (https://keybase.io/lennon) on keybase. | |
* I have a public key whose fingerprint is 0687 E8DA D652 0FAF E783 8106 0A0D 4ABE 6A86 3BDD | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLEW_STATIC | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <thread> | |
#include <cmath> | |
#define GLSL(src) "#version 150 core\n" #src | |
const char* vertex = GLSL( | |
in vec2 position; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webdriver = require('selenium-webdriver'); | |
var driver = new webdriver.Builder(). | |
withCapabilities(webdriver.Capabilities.chrome()). | |
build(); | |
driver.get('http://www.google.com'); | |
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver'); | |
driver.findElement(webdriver.By.name('btnG')).click(); | |
driver.wait(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct foo { | |
virtual int bar() = 0; | |
virtual int baz() = 0; | |
}; | |
struct qux: public virtual foo { | |
int bar() { | |
return baz(); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo(a,b,c) { | |
this.a=a; | |
this.b=b; | |
this.c=c; | |
} | |
function a1() { | |
return this.b(); | |
}; | |
//... |