Skip to content

Instantly share code, notes, and snippets.

View iancrowther's full-sized avatar
💻
01001011 01101111 01101110 01100001 01101101 01101001

Ian Crowther iancrowther

💻
01001011 01101111 01101110 01100001 01101101 01101001
View GitHub Profile
@iancrowther
iancrowther / media.css
Last active August 29, 2015 14:07 — forked from BenHall/media.css
/* iPhone */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) { /* iPhone 5 in portrait & landscape */
}
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape) { /* iPhone 5 in landscape */
@iancrowther
iancrowther / README.md
Last active August 29, 2015 14:19
A collection of technology tips

A collection of technology tips

@iancrowther
iancrowther / README.md
Last active August 29, 2015 14:19
OSX Install Scripts
@iancrowther
iancrowther / nodeschool-int-checklist.md
Last active August 29, 2015 14:21
Nodeschool Organiser Checklist
  • read the participating guide
  • ensure attendees added to rollcall team
  • ensure organisers only are on the organisers team (clensing excercise)
  • record videos and be social
  • fill in the data collection form
  • appear.in/nodeschool hangout
  • buy swag
  • have fun

Image service - S3 client acess - 1652 ms should allow access to uploaded files by the app - 1041 ms should not allow web access to uploaded files - 392 ms should not allow an unauthorised user to access the bucket - 218 ms

Image service - upload limit - 972 ms should reject uploads if they are over 2MB - 652 ms should allow uploads if they are under 2MB - 320 ms

#uploadFileForPublicAccess - 341 ms

@iancrowther
iancrowther / international-day-2015.md
Last active August 29, 2015 14:21
An overview of international nodeschool day 2015

International Nodeschool 2015

[logo]

Let me start by saying how grateful I am to everyone who contributed to this event. From comment to code, your contributions were essential in shaping the success of the day, so thank you, thank you, thank you.

Did everyone have a good time?

From where I was stood it looked like everyone was having a ball.

from streams session

  • end-of-stream - specify a callback to be called when a stream ends (which is surpsingly hard to get right)
  • duplexify - compose a Duplex stream from a Readable and a Writable stream
  • pump - pipe streams together and close all of them if one of them closes
  • pumpify - combine an array of streams into a single duplex stream using pump and duplexify
  • through2 - tools for making Transform streams
  • from2 - tools for making Readable streams

from "participatory modules" session

@iancrowther
iancrowther / lambda-not-anon.js
Created October 23, 2015 10:01
The distinction between anonymous functions and lambdas in JavaScript.
// TL;DR - Lambda means "function used as data".
// Anonymous function means "function without a name".
// This is one of the relatively few cases where the Wikipedia definition of
// a word, while not entirely wrong, is misleading. Lambdas and anonymous
// functions are distinct ideas.
// These ideas are commonly confused because in many programming languages
// all lambdas are anonymous or vise verse.
@iancrowther
iancrowther / active.md
Created June 20, 2016 13:04 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Fri, 19 Jun 2015 15:17:38 GMT till Sun, 19 Jun 2016 15:17:38 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 635)
@iancrowther
iancrowther / fix_github_https_repo.sh
Created October 19, 2016 18:03 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi