Skip to content

Instantly share code, notes, and snippets.

View leadegroot's full-sized avatar

Lea de Groot leadegroot

View GitHub Profile
@leadegroot
leadegroot / bulkCloneMoreThan100Repos.md
Created July 3, 2017 02:20
bulk clone github repos from a user or organisation

IF there are 100 or fewer repos, simply run:

curl -u $YOURUSERNAME -s https://api.github.com/orgs/$ORGNAME/repos?per_page=100 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'

(per https://gist.github.com/caniszczyk/3856584 )

and wait.

(Note when prompted for password, they do not mean your github web password, they mean your oauth token - all command line requests for password are actually for oath token. See https://github.com/blog/1509-personal-api-tokens to generate a token.)

@leadegroot
leadegroot / gist:f37753b9e24639f84e336b3520a290d6
Created April 15, 2017 23:24
Use nightwatchjs to get some content from a webpage and store it in a cookie
var urlTest = 'https://example.com/';
var resultsCountCookieName = 'myCookie';
module.exports = {
'@tags': ['exampletagname'],
'Get Value from webpage into cookie' : function (client) {
// a week seems a suitable length of time to have the cookie last...