Skip to content

Instantly share code, notes, and snippets.

View nelsonic's full-sized avatar
💭
Let's Build a Better World Together!☀️

Nelson nelsonic

💭
Let's Build a Better World Together!☀️
View GitHub Profile
@dscape
dscape / books.txt
Last active August 29, 2015 14:04
Books for the YLD Office
Predictably Irrational: The Hidden Forces that Shape Our Decisions
Quiet: The power of introverts in a world that can't stop talking
Business Adventures
Zero to One
Beyond Budgeting
Winning Decisions: Getting It Right the First Time
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
First, Break All the Rules
@missinglink
missinglink / openstreetmap-stream.sh
Last active August 29, 2015 14:06
stream the latest 26GB openstreetmap .pbf planet dump to a terminal near you; a bash one-liner courtesy of mapzen
#!/bin/bash
npm install openstreetmap-stream; curl -s http://planet.osm.org/pbf/planet-latest.osm.pbf | node -e "var osm = require('openstreetmap-stream'); process.stdin.pipe(osm.parser()).pipe(osm.stringify).pipe(process.stdout);";
curl https://saucelabs.com/rest/v1/[username]/js-tests \
-X POST \
-u [username]:[username] \
-H 'Content-Type: application/json' \
--data '{
"platforms": [["Windows 8", "internet explorer", "10"]],
"url": "https://qunit.herokuapp.com/test/test.html?coverage=true",
"framework": "qunit"}'
@ofca-snippets
ofca-snippets / ngHTML.angular.js
Created December 10, 2012 20:50
Angular ngHTML directive. This directive allow you to put raw HTML in a DOM element.
/**
* @example
* <span ng-html='foo.bar'></span>
*/
app.directive('ngHtml', function() {
return function(scope, element, attrs) {
scope.$watch(attrs.ngHtml, function(value) {
element[0].innerHTML = value;
});
}
@danyx23
danyx23 / elm-package.json
Last active December 22, 2017 17:52
Simple example of using Ports in Elm
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
@chrisbuttery
chrisbuttery / Main.elm
Last active January 3, 2018 17:15
Elm 0.17. A simple Mouse.moves example
import Html exposing (Html, text, div)
import Html.App as Html
import Mouse exposing (..)
main =
Html.program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
@nelsonic
nelsonic / travis-deploy-ssh.md
Created May 25, 2018 19:56 — forked from m3t/travis-deploy-ssh.md
Continuous deployment over SSH with Tavis CI, e.g. gh-pages

On Mar 28, 2013 Dan Allen explained how to deploy to github-pages automatically. Many other GitHub users like Steve Klabnik and Domenic Denicola followed with the same approach:

Use an OAuth token with public_repo or repo permission to access the Github account over HTTPS inside a virtual build environment.

The same applies to Travis CI's built-in abilities, and there are more restrictions as deploying GitHub Releases works only for tags, not for branches.

Security concerns

The token grants write access for all of your (public) repositories and

@rlefevre
rlefevre / elm-dmy-fr.md
Last active March 23, 2020 13:48
Elm using elm.dmy.fr proxies

Update: As package.elm-lang.org IP address has been changed and is not blocked anymore as far as I know, these proxies have been disabled. If you still need them, add a comment describing why.


Here is how to use the proxies:

Packages documentation

Two options:

1. Browse elm.dmy.fr instead of package.elm-lang.org

port module Spelling exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
main =
@letmaik
letmaik / README.md
Last active November 23, 2020 04:37
Using travis_retry inside shell scripts together with set -e

If you want to use travis_retry from within your own shell script files then you first have to make the travis_retry shell function available by sourcing the travis_retry.sh file, otherwise you just get a "command not found" error. See example.sh for a full example.

Note that the original function as found in the travis-ci/travis-build repository was slightly modified to allow it to be used in a shell context where set -e is enabled.

For reference, a tweet by Travis CI saying that you should copy the travis_retry code as I've done here: https://twitter.com/plexus/status/499194992632811520