Skip to content

Instantly share code, notes, and snippets.

View tzmartin's full-sized avatar
🏴‍☠️
ahoy!

tz ✨ tzmartin

🏴‍☠️
ahoy!
View GitHub Profile
@mathisonian
mathisonian / index.md
Last active August 10, 2024 20:59
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

var download = require('./lib/download');
download('http://meuarquivolocodedoido.com.br/arquivo.txt', './downloads')
.then(function(id){
console.log('Arquivo gravado com id %s', id);
})
.catch(function(err){
console.log('Deu pau..');
console.log(err.stack);
});

Install cask that extends the brew command :

brew install phinze/cask/brew-cask

Install calibre using cask :

brew cask install calibre
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@jbenet
jbenet / simple-git-branching-model.md
Last active April 17, 2025 09:30
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@toolness
toolness / workshopper-remote-verification-api.md
Created September 11, 2013 18:37
Workshopper Remote Verification API Proposal

The Workshopper Remote Verification API is a simple API that allows clients to provide solutions for Workshopper problems to remote websites, and potentially receive [Open Badges][] in response.

The remote website can implement its own verification policies. For instance, a site that trusts its users can simply accept solutions without question, or it can actually execute the code in a sandbox, or it can queue the solution for review by a human.

@FokkeZB
FokkeZB / index.php
Last active February 26, 2022 22:44
Script to create custom shortcuts on the iOS springboard. Check it out at: http://dev.fokkezb.nl/shortcutter
<?
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (!empty($_FILES['icon']['tmp_name']) && !$_FILES["file"]["error"]) {
$icon = new Imagick($_FILES['icon']['tmp_name']);
unlink($_FILES['icon']['tmp_name']);
}
if (empty($icon)) {
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
@jasonkneen
jasonkneen / 1readme.md
Last active May 28, 2021 16:48
Quick example of registering a URLScheme in a Titanium app using the TiApp.xml without info.plist file. Just add the following into your TiApp.xml (I put it under the </iphone> tag. Works on Android and iOS.

Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js