Skip to content

Instantly share code, notes, and snippets.

View rivy's full-sized avatar
🏠
Working from home

Roy Ivy III rivy

🏠
Working from home
View GitHub Profile
@pfig
pfig / perl_smoker
Created May 21, 2011 21:21 — forked from melo/perl_smoker
Script to use with Jenkins to smoke a Perl module
#!/bin/sh
#
# Use this as Jenkins Build "Execute shell" script
#
# Pedro Melo <melo@simplicidade.org>
## Die on any errors
set -ex
export OUTPUT=$WORKSPACE/logs
@mathiasbynens
mathiasbynens / unsafeWindow.user.js
Created August 13, 2011 13:21
`unsafeWindow` polyfill (for use in user scripts)
// ==UserScript==
// @name Emulate `unsafeWindow` in browsers that don’t support it.
// ==/UserScript==
// http://mths.be/unsafewindow
window.unsafeWindow || (
unsafeWindow = (function() {
var el = document.createElement('p');
el.setAttribute('onclick', 'return window;');
return el.onclick();
@dupuy
dupuy / README.rst
Last active June 3, 2024 23:01
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@andris9
andris9 / git-cache-meta.sh
Created March 5, 2012 13:15
git-cache-meta
#!/bin/sh -e
#git-cache-meta -- simple file meta data caching and applying.
#Simpler than etckeeper, metastore, setgitperms, etc.
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
#modified by n1k
# - save all files metadata not only from other users
# - save numeric uid and gid
# 2012-03-05 - added filetime, andris9
@btoone
btoone / curl.md
Last active May 14, 2024 19:32
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@endolith
endolith / readme.md
Created May 22, 2012 17:34
Double file extensions

.rst

The official file extension for reStructuredText files is .txt, but this is a stupid standard that should be ignored.

2.4 What's the standard filename extension for a reStructuredText file?
It's ".txt". Some people would like to use ".rest" or ".rst" or ".restx", but why bother? ReStructuredText source files are meant to be readable as plaintext, and most operating systems already associate ".txt" with text files. Using a specialized filename extension would require that users alter their OS settings, which is something that many users will not be willing or able to do.

.rst.txt

@miyagawa
miyagawa / buildable-git-repo.md
Last active April 17, 2019 14:48
Buildable git repo for CPAN

Buildable, Testable, Installable Git repo for Perl modules

tl;dr We might need a standard build file to build a module from Git repository, especially for the ones using Module::Install or dzil.

The problem

When an author of CPAN module uses an authoring tool that generates build files when shipping them to CPAN, the git repository usually doesn't have enough files to build, test and install the module.

For example, if dzil (Dist::Zilla) is used, the repository only conatains dist.ini and there's no Makefile.PL or Build.PL so standard CPAN installers or Continuous Integration tools don't know how to run tests on it.

@wrobstory
wrobstory / README.md
Last active March 22, 2022 21:06
Folium Employed Choropleth

A Leaflet.js map created with Folium and the default D3 threshold scale, with data bound between the Pandas DataFrame and the TopoJSON. See the Gist for the python code to generate the dataframe. The map was generated with the following Python code:

map_1 = folium.Map(location=[48, -102], zoom_start=3)
map_1.geo_json(geo_path=county_geo, data_out='data1.json', data=df,
               columns=['GEO_ID', 'Employed_2011'],
               key_on='feature.id',
               fill_color='YlOrRd', fill_opacity=0.7, line_opacity=0.3,
               topojson='objects.us_counties_20m')
map_1.create_map(path='map_1.html')
@ralphbean
ralphbean / list-all-repos.py
Created June 7, 2013 23:17
Script to list all repos for a github organization
#!/usr/bin/env python
""" Print all of the clone-urls for a GitHub organization.
It requires the pygithub3 module, which you can install like this::
$ sudo yum -y install python-virtualenv
$ mkdir scratch
$ cd scratch
$ virtualenv my-virtualenv
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"