This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Install | |
apt-get install apache2 | |
apt-get install php5 libapache2-mod-php5 | |
apt-get install php5-imap | |
apt-get install libssh2-php | |
apt-get install mysql-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff : compare current with staged (or with last commit if no staged one) | |
git diff —staged : compare staged with last commit | |
git diff <master>…<topicbr> : show diff introduced by topicbr comparing to master (base commit in master) | |
git diff <sha-1> : show diff betwheen latest commit of current branch and other commit (sha-1) | |
git log -n : view last n commits | |
git log -n -p : last n commits with summary of changes (diff) | |
git log -n —graph : graphical view branch history | |
git log —pretty=oneline : each commit at one line | |
git log <br1> —not <br2> : list commits which are in br1 but not in br2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias glog="git log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%ai) %C(bold blue)<%an>%Creset'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JQuery | |
(function(root, $) { | |
/** | |
* Doc Block | |
*/ | |
function ClassName() { | |
// Methods and variables | |
} | |
// register namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
import {environment} from "../../environments/environment"; | |
/** Encryption Stuff **/ | |
var CryptoJS = require("crypto-js"); | |
var hmacsha1 = require('hmacsha1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
require_once WP_CONTENT_DIR.'/plugins/amazon-web-services/vendor/aws/aws-autoloader.php'; | |
use \Aws\S3\S3Client; | |
add_filter('gform_upload_path', 'gform_change_upload_path', 10, 2); | |
add_action('gform_after_submission', 'gform_submit_to_s3', 10, 2); | |
//change gravity form upload path to point to S3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as mocha from 'mocha'; | |
import * as chai from 'chai'; | |
import chaiHttp = require('chai-http'); | |
import app from '../src/App'; | |
let nock = require('nock'); | |
chai.use(chaiHttp); | |
const expect = chai.expect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Analytics } from './../src/Analytics'; | |
import * as mocha from 'mocha'; | |
import * as chai from 'chai'; | |
const sinon = require('sinon'); | |
const analytics = require('universal-ga'); | |
const expect = chai.expect; | |
const fakeId = 'ABC-123-XYZ'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Mock jQuery calls with Jasmine', function() { | |
it('how to mock $("test").show()', function() { | |
// mock the call | |
spyOn($.fn, 'show').andCallFake(function() { | |
return true; | |
}); | |
// now we can call the mock | |
result = $("test").show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
OlderNewer