- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/5798930 (
git resetvsgit rm --cached)
This file contains hidden or 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
| For symmetic encryption, you can use the following: | |
| To encrypt: | |
| openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt | |
| To decrypt: | |
| openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt | |
| For Asymmetric encryption you must first generate your private key and extract the public key. |
This file contains hidden or 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
| // Usage: phantomjs openload.js <video_url> | |
| // if that doesn't work try: phantomjs --ssl-protocol=any openload.js <video_url> | |
| var separator = ' | '; | |
| var page = require('webpage').create(), | |
| system = require('system'), | |
| id, match; | |
| if(system.args.length < 2) { | |
| console.error('No URL provided'); |
This file contains hidden or 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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Cwd; | |
| # Opening a new window. | |
| # Fixed version of script from | |
| # http://lists.schmorp.de/pipermail/rxvt-unicode/2012q3/001609.html | |
| # by José Romildo Malaquias <malaquias at gmail.com> |
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
This file contains hidden or 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
| #!/usr/bin/env python | |
| # vim:fileencoding=utf-8 | |
| """ [NAME] script or package easy description | |
| [DESCRIPTION] script or package description | |
| """ | |
| from datetime import datetime | |
| from argparse import ArgumentParser | |
| import pprint |
This file contains hidden or 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
| var buff = new Buffer(100); | |
| fs.open(file, 'r', function(err, fd) { | |
| fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) { | |
| var start = buffer.indexOf(new Buffer('mvhd')) + 17; | |
| var timeScale = buffer.readUInt32BE(start, 4); | |
| var duration = buffer.readUInt32BE(start + 4, 4); | |
| var movieLength = Math.floor(duration/timeScale); | |
| console.log('time scale: ' + timeScale); | |
| console.log('duration: ' + duration); |
This file contains hidden or 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
| /* | |
| * https://css-tricks.com/snippets/css/font-stacks/ | |
| * https://css-tricks.com/snippets/css/system-font-stack/ | |
| */ | |
| /* Times New Roman-based stack */ | |
| font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
| /* Modern Georgia-based serif stack */ | |
| font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; |
This file contains hidden or 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
| const express = require('express') | |
| const bodyParser = require('body-parser') | |
| const app = express() | |
| // app.use(function (req, res, next) { | |
| // req.rawBody = ''; | |
| // req.setEncoding('utf8'); | |
| // req.on('data', function (chunk) { |
This file contains hidden or 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 re, requests, json; | |
| from html.parser import HTMLParser | |
| class SSLParser(HTMLParser): | |
| def handle_data(self, data): | |
| self.result.append(data) | |
| def setup(self): | |
| self.result = []; | |