(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| # Slow | |
| curl -s ifconfig.me | xargs echo -n | |
| # Faster | |
| curl -s icanhazip.com | xargs echo -n | |
| # API: http://api.ident.me |
| directive( 'ignoreMouseWheel', function( $rootScope ) { | |
| return { | |
| restrict: 'A', | |
| link: function( scope, element, attrs ){ | |
| element.bind('mousewheel', function ( event ) { | |
| element.blur(); | |
| } ); | |
| } | |
| } | |
| } ); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <?php | |
| // BELIEVE THIS ONLY WORKS WHEN USING MYSQL | |
| // DROP THIS INTO GLOBAL.PHP | |
| Validator::extend('columnexists', function($attribute, $value, $parameters) | |
| { | |
| $query = DB::select("SHOW COLUMNS FROM " . $parameters[0]); |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| Go to Bitbucket and create a new repository (its better to have an empty repo) | |
| git clone [email protected]:abc/myforkedrepo.git | |
| cd myforkedrepo | |
| Now add Github repo as a new remote in Bitbucket called "sync" | |
| git remote add sync [email protected]:def/originalrepo.git | |
| Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
| git remote -v |
| /*! | |
| * gulp | |
| * $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
| */ | |
| // Load plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |
| #! /bin/bash | |
| # | |
| # slugify.sh by Ronan | |
| # | |
| # Distributed under terms of the MIT license. | |
| # | |
| cd photos | |
| for file in *.png; do | |
| filename=${file%.*} |
| # Note (November 2016): | |
| # This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
| # Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name yourserver.com; | |
| root /path/to/your/htdocs; |