Skip to content

Instantly share code, notes, and snippets.

View enricobacis's full-sized avatar

Enrico Bacis enricobacis

View GitHub Profile
SHELL := /bin/bash
YARN := yarn
VENDOR_DIR = assets/vendor/
JEKYLL := jekyll
PROJECT_DEPS := package.json
.PHONY: all clean install update
all : serve
@enricobacis
enricobacis / ltmux
Created February 21, 2017 11:06
lazy tmux
#!/bin/bash
WHOAMI=$(whoami)
if tmux has-session -t $WHOAMI 2>/dev/null; then
tmux -2 attach-session -t $WHOAMI
else
tmux -2 new-session -s $WHOAMI
fi
from fritzconnection import FritzConnection
import telepot
import re
connection = FritzConnection(password='YOUR_FROTS_PASSWORD')
ip = connection.call_action('WANPPPConnection', 'GetInfo')['NewExternalIPAddress']
match = re.search('^100\.', ip)
if match:
@mamiu
mamiu / install_fish_debian.sh
Last active November 24, 2018 12:25
Install fish shell in Debian 8 (commands from the original fish shell website).
#!/bin/bash
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' >> /etc/apt/sources.list.d/fish.list
apt-get update
wget -qO - http://download.opensuse.org/repositories/shells:fish:release:2/Debian_8.0/Release.key | apt-key add -
apt-get update
apt-get install -y fish
@killercup
killercup / Readme.md
Last active August 26, 2023 23:14
Convert The Rust Programming Language to Epub
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@davetrux
davetrux / SQLiteDebugADB
Created March 24, 2014 14:42
Verbose Logging of SQLite statements in Android
adb shell setprop log.tag.SQLiteLog V
adb shell setprop log.tag.SQLiteStatements V
adb shell stop
adb shell start
@lopopolo
lopopolo / gist:9427762
Created March 8, 2014 09:19
Relink all homebrew formulae after Mavericks upgrade
▶ brew list -1 | while read line; do brew unlink $line; brew link $line; done
Unlinking /usr/local/Cellar/appledoc/2.2... 0 links removed
Linking /usr/local/Cellar/appledoc/2.2... 1 symlinks created
Unlinking /usr/local/Cellar/autoconf/2.69... 0 links removed
Linking /usr/local/Cellar/autoconf/2.69... 18 symlinks created
Unlinking /usr/local/Cellar/bash-completion/1.3... 184 links removed
Linking /usr/local/Cellar/bash-completion/1.3... 182 symlinks created
Unlinking /usr/local/Cellar/bgrep/0.2... 0 links removed
Linking /usr/local/Cellar/bgrep/0.2... 1 symlinks created
Unlinking /usr/local/Cellar/binutils/2.24... 49 links removed
@gear11
gear11 / main.py
Created December 17, 2013 14:54
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""
@hannes-brt
hannes-brt / ipy_hide_input
Created August 12, 2013 00:20
This is a simple command line tool that adds a small snippet of Javascript to the end of the HTML output of `ipython nbconvert` that hides the input code in the output. This works for both '--to html' and '--to slides' The tool works both when given a file name or by reading from stdin: ```bash ipy_hide_input input_file.slides.html ipython nbcon…
#! /usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2013 Hannes Bretschneider
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