Skip to content

Instantly share code, notes, and snippets.

View incidunt's full-sized avatar

incidunt incidunt

View GitHub Profile
#Python 2
python -m SimpleHTTPServer 8080
#Python 3
python3 -m http.server 8113
@incidunt
incidunt / snowjob.sh
Last active August 29, 2015 14:06 — forked from sontek/snowjob.sh
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
@incidunt
incidunt / clients.md
Last active August 29, 2015 14:06 — forked from defunkt/clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@incidunt
incidunt / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@incidunt
incidunt / README.md
Created December 24, 2015 17:53 — forked from JoelBesada/README.md
Backtick Example Command

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
-------------------------------------------------------------------------------------------
REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2016/05/25 15:01
-------------------------------------------------------------------------------------------
NOTES
-------------------------------------------------------------------------------------------
AppleScript is a rather peculiar scripting language to learn.
@incidunt
incidunt / browser_history.md
Created January 10, 2018 16:37 — forked from dropmeaword/browser_history.md
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@incidunt
incidunt / tmux-cheatsheet.markdown
Created January 10, 2018 16:48 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@incidunt
incidunt / exif_gps.py
Created February 23, 2018 13:45 — forked from snakeye/exif_gps.py
Python: get GPS latitude and longitude coordinates from JPEG EXIF using exifread
import exifread
# based on https://gist.github.com/erans/983821
def _get_if_exist(data, key):
if key in data:
return data[key]
return None