An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| #!/bin/sh | |
| # This hook is used to push a mirrored version of all committed files to your remote repo after they are commited | |
| # Replace this variable with your remote repo name | |
| REPO=dropbox | |
| echo | |
| echo "==== Sending changes to $REPO repo ====" | |
| echo |
| // Takes a credit card string value and returns true on valid number | |
| function valid_credit_card(value) { | |
| // Accept only digits, dashes or spaces | |
| if (/[^0-9-\s]+/.test(value)) return false; | |
| // The Luhn Algorithm. It's so pretty. | |
| let nCheck = 0, bEven = false; | |
| value = value.replace(/\D/g, ""); | |
| for (var n = value.length - 1; n >= 0; n--) { |
| angular.module('bDatepicker', []). | |
| directive('bDatepicker', function(){ | |
| return { | |
| require: '?ngModel', | |
| restrict: 'A', | |
| link: function ($scope, element, attrs, controller) { | |
| var updateModel, onblur; | |
| if (controller != null) { | |
When I list my npm packages with npm ls -g (or without the -g option for a local node_modules directory) I see all installed packages and their dependencies. Like so:
$ npm ls -g
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
-moz-appearance to none. This will "reset" the styling of the element;text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var sass = require('gulp-sass'); | |
| var lr = require('tiny-lr'); | |
| var http = require('http'); | |
| var path = require('path'); | |
| var ecstatic = require('ecstatic'); | |
| var tlr = lr(); | |
| var livereload = function (evt, filepath) { | |
| tlr.changed({ |