Skip to content

Instantly share code, notes, and snippets.

View langheran's full-sized avatar
🎧
Automation Ninja 🐱‍👓

Nisim Hurst-Tarrab langheran

🎧
Automation Ninja 🐱‍👓
View GitHub Profile
@zed
zed / .gitignore
Created August 25, 2012 22:42
call Python callback from a non-python thread in a C extension module
/c_extension_module*.so
/build/*
/.do_built*
/log
/all.did
@mattratleph
mattratleph / vimdiff.md
Last active July 18, 2024 15:03 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@tiffany352
tiffany352 / gist:7266437
Last active June 27, 2021 23:10
Greasemonkey script to replace html5 video with VLC player, modified from the broken http://userscripts.org/scripts/show/167777
// ==UserScript==
// @name HTML5 video using VLC plugin
// @grant none
// @include *
// ==/UserScript==
function html5vlc(){
var videos = document.getElementsByTagName("video");
var embeds = new Array(videos.length);
for (var i = 0; i < videos.length; i++) {
var vlc = document.createElement("embed");
@lyoshenka
lyoshenka / search-git-history.md
Last active July 23, 2024 21:24
Search Git commit history for a string and see the diffs

Searching Git commit history

This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:

To find which commits and which files a string was added or removed in:

git log -S'search string' --oneline --name-status

To see the diff of that

@iamnewton
iamnewton / bash-colors.md
Last active July 25, 2024 19:33
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@cancan101
cancan101 / perspective-quadrilateral.ipynb
Created May 1, 2014 23:48
Automatic perspective correction for quadrilateral objects
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 11, 2024 16:08
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@derekmcloughlin
derekmcloughlin / stats_equations.Rmd
Last active June 25, 2024 17:26
Useful Latex Equations used in R Markdown for Statistics
---
title: "Sample Equations used in Statistics"
output: html_document
---
### Summations
### Without Indices
$\sum x_{i}$
@IanHopkinson
IanHopkinson / lxml_examples.py
Created November 24, 2015 19:42
Examples of xpath queries using lxml in python
#!/usr/bin/env python
# encoding: utf-8
import lxml.etree
import lxml.html
import requests
xml_sample = """<?xml version="1.0" encoding="UTF-8"?>
<foo:Results xmlns:foo="http://www.foo.com" xmlns="http://www.bah.com">
<foo:Recordset setCount="2">