Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tobias Hochgürtel tobiashochguertel

🎯
Focusing
View GitHub Profile
@tobiashochguertel
tobiashochguertel / sync_pins.js
Created Nov 25, 2020 — forked from Timopheym/sync_pins.js
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 = 'http://widgets.pinterest.com/v3/pidgets/boards/';
var sync_dir = './images', image_url, image_path, current_user_boards, current_user_name, board_dir;
var users = {
timopheym : [
'skatches',
'home',
@tobiashochguertel
tobiashochguertel / Embedded Python in BASH
Created Nov 20, 2020 — forked from welbornprod/Embedded Python in BASH
A little trick to embed python code in a BASH script.
View Embedded Python in BASH
#!/bin/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 {
@tobiashochguertel
tobiashochguertel / build
Created Jun 29, 2020 — forked from svdgraaf/build
nginx + geo ip + secure download
View build
$ ./configure --add-module=/home/svdgraaf/tmp/nginx/ngx_http_bytes_filter_module-57365655ee44 --with-http_geoip_module --add-module=/home/svdgraaf/tmp/nginx/ngx_secure_download
View Gnome-Terminal.v3.28.3.md

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@tobiashochguertel
tobiashochguertel / gist:e3cd0e2d4033e243b40bc9031fba67d1
Created Jun 13, 2020 — forked from jtdp/gist:5443297
See changes before pulling from remote git repository
View gist:e3cd0e2d4033e243b40bc9031fba67d1
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@tobiashochguertel
tobiashochguertel / install-tmux
Created Mar 12, 2019 — forked from suhlig/install-tmux
Install tmux 2.7 on rhel/centos 7
View install-tmux
# Install tmux on rhel/centos 7
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xvzf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
View init.lua
-- File Location: ~/.hammerspoon/init.lua --
-- DISPLAY FOCUS SWITCHING --
--One hotkey should just suffice for dual-display setups as it will naturally
--cycle through both.
--A second hotkey to reverse the direction of the focus-shift would be handy
--for setups with 3 or more displays.
--Bring focus to next display/screen
View Jenkinsfile
pipeline {
// run on jenkins nodes tha has java 8 label
agent { label 'java8' }
// global env variables
environment {
EMAIL_RECIPIENTS = 'mahmoud.romeh@test.com'
}
stages {
stage('Build with unit testing') {
@tobiashochguertel
tobiashochguertel / script.sh
Created Jun 21, 2018 — forked from cheungnj/script.sh
Convert asciidoc to Github Flavored Markdown
View script.sh
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor
@tobiashochguertel
tobiashochguertel / user.conf
Created Jun 12, 2018 — forked from JamieMason/user.conf
Apache .conf to disable caching for localhost
View user.conf
<Directory "/Users/jdog/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/jdog/Sites/
You can’t perform that action at this time.