Skip to content

Instantly share code, notes, and snippets.

View madbence's full-sized avatar
🙈
watching cat videos on the internet

Bence Dányi madbence

🙈
watching cat videos on the internet
View GitHub Profile
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
# 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
}
#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() {
#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;
#!/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..."
### 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:
#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;
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() {
struct foo {
virtual int bar() = 0;
virtual int baz() = 0;
};
struct qux: public virtual foo {
int bar() {
return baz();
}
};
function Foo(a,b,c) {
this.a=a;
this.b=b;
this.c=c;
}
function a1() {
return this.b();
};
//...