Skip to content

Instantly share code, notes, and snippets.

@anabelle
anabelle / github_update.php
Last active Nov 12, 2016
github_update.php
View github_update.php
<?php $output = shell_exec('git fetch --all && git reset --hard origin/prod'); ?>
<style>
body{
background-color: #1A1A1A;
color:#fff;
}
pre{
padding:20px;
}
@bennadel
bennadel / lazy-loading-images.htm
Created Jul 23, 2013
Lazy Loading Image With AngularJS
View lazy-loading-images.htm
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Lazy Loading Images With AngularJS
</title>
<style type="text/css">
@adityamukho
adityamukho / User.js
Last active Mar 7, 2019
Passport authentication for Sails.js 0.9.x
View User.js
/**
* api/models/User.js
*
* The user model contains the instance method for validating the password.
*/
var bcrypt = require('bcrypt');
function hashPassword(values, next) {
bcrypt.hash(values.password, 10, function(err, hash) {