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.
#!/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 |
// ==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(); |
#!/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 |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
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.
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.
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.
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')
#!/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 |
# | |
# 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)" |