Skip to content

Instantly share code, notes, and snippets.


Tobias Hochgürtel tobiashochguertel

View GitHub Profile
Timopheym / sync_pins.js
Last active Nov 25, 2020
Small script to download your pinterest boards to your machine. Limit 50 pins per board... but you can download all pins from board using instruction inside ;)
View sync_pins.js
var request = require("request");
var fs = require("fs");
var api_root = '';
var sync_dir = './images', image_url, image_path, current_user_boards, current_user_name, board_dir;
var users = {
timopheym : [
rafaeltuelho /
Last active Dec 2, 2020
installing gosu on a centos docker box
# Install gosu.
RUN gpg --keyserver --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && curl -o /usr/local/bin/gosu -SL "${GOSU_VERSION}/gosu-amd64" \
    && curl -o /usr/local/bin/gosu.asc -SL "${GOSU_VERSION}/gosu-amd64.asc" \
    && gpg --verify /usr/local/bin/gosu.asc \
    && rm /usr/local/bin/gosu.asc \
    && rm -r /root/.gnupg/ \
    && chmod +x /usr/local/bin/gosu \
domenic / angularpromise.js
Created Jan 21, 2016
How to subclass a promise
View angularpromise.js
// ES6
class AngularPromise extends Promise {
constructor(executor) {
super((resolve, reject) => {
// before
return executor(resolve, reject);
// after
sgtoj /
Last active Dec 12, 2020
Ubuntu for Windows: Mounting C: Drive to WSL's Root
# allow `mount` cmd without password
echo "$USER ALL=NOPASSWD: /bin/mount" | (sudo su -c 'EDITOR="tee -a" visudo')
# add the mount directive to `fstab`
sudo mkdir -p /c
sudo sh -c "echo '/mnt/c /c none bind' >> /etc/fstab"
# update to `.bashrc` to auto mount at login
echo "sudo mount -a" >> ~/.bashrc
# now reload it
source ~/.bashrc
DominicTobias / conduit.connect.js
Last active Dec 13, 2020
Connect to Phabricator with node.js
View conduit.connect.js
var Connect = function() {
this.fs = require('fs');
this.crypto = require('crypto');
this.http = require('http');
this.url = require('url');
this.q = require('q');
BlakeGardner / install
Last active Dec 18, 2020
Syntax highlighting in nano on Mac OS
View install
# install Homebrew if you don't already have it:
# install nano from homebrew
brew install nano
# update your nanorc file with the contents of the nanorc file below
nano ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
suhlig / install-tmux
Last active Dec 23, 2020 — forked from philipsd6/install-tmux
Install tmux on rhel/centos
View install-tmux
# Install tmux on rhel/centos 7
# What do we want?
# install deps
yum install gcc kernel-devel make ncurses-devel
# Credits to for inspiration
function setTabname {
echo -ne "\033]0;"$*"\007"
# set the title using above declared function and set the color of
mrchief /
Last active Dec 28, 2020
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

welbornprod / Embedded Python in BASH
Created Aug 14, 2014
A little trick to embed python code in a BASH script.
View Embedded Python in BASH
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {
You can’t perform that action at this time.