Python script to download/shallow clone the files of a directory at bitbucket. This is useful when you just want a copy of the files in a subdirectory of a repository without needing mercurial or having to download the entire repository.
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.
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
var urls = []string{ | |
"https://splice.com/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
url(r'^v1/tiles/(?P<tile_user>([^/]+))/(?P<tile_layer>([^/]+))/(?P<tile_zoom>(\d+))/(?P<tile_column>(\d+))/(?P<tile_row>(\d+))\.(?P<tile_format>([a-z]+))$', TileManager.as_view(), name='tile_manager'), | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
def make_color_tuple( color ): | |
""" | |
turn something like "#000000" into 0,0,0 | |
or "#FFFFFF into "255,255,255" | |
""" | |
R = color[1:3] | |
G = color[3:5] | |
B = color[5:7] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install httparty | |
# ruby gists.rb | |
require 'httparty' | |
class Gists | |
include HTTParty | |
@username = 'x' | |
@password = 'x' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* curl_multi_test.c | |
Clemens Gruber, 2013 | |
<clemens.gruber@pqgruber.com> | |
Code description: | |
Requests 4 Web pages via the CURL multi interface | |
and checks if the HTTP status code is 200. | |
Update: Fixed! The check for !numfds was the problem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from subprocess import PIPE, Popen | |
from threading import Thread | |
try: | |
from Queue import Queue, Empty | |
except ImportError: | |
from queue import Queue, Empty # python 3.x | |
ON_POSIX = 'posix' in sys.builtin_module_names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
SELECT ?country ?same | |
WHERE { | |
?country rdf:type dbpedia-owl:Country . | |
?country owl:sameAs ?same . | |
} |
OlderNewer