Skip to content

Instantly share code, notes, and snippets.

View nemesisqp's full-sized avatar

NĐQP nemesisqp

  • Vietnam
View GitHub Profile
@nemesisqp
nemesisqp / encode.sh
Created April 25, 2019 00:01 — forked from jeffpamer/encode.sh
Smooth Scrubbing Web Video FFMPEG Mega Command
ffmpeg -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -an -vf "scale=-1:1440, reverse" -preset veryslow -g 2 output.mp4
// -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3
// Encode for web with a good balance of browser compatibility and compression ratio
// -an
// Strip audio tracks
// -vf "scale=-1:1440, reverse"
// Scale video to 1440px wide, maintaining aspect ratio
@nemesisqp
nemesisqp / c#.txt
Last active January 24, 2019 07:42
Programming Language Common Words
summary System using public return this the if new param string name null int get to void value var set false of private true assembly else The is returns for object static in bool Windows Assert override class case Collections break namespace global type throw result endregion Generic using Name and remarks Add resource Forms const try para Text or Linq an Test region code catch Microsoft Runtime that default aapt java cref be from base with not internal protected Type Length file by exception as see Data values Exception Version typeof following ComponentModel byte ToString ex String item Diagnostics generated Fact Web Drawing Value index can source context method Threading This data Count foreach ComVisible on COM List Dispose you out AreEqual virtual message reader information Create readonly endif If attribute double Serialization Console field AccessFlags Dot42 Controls DexImport Xml request IO node key Build ArgumentNullException sender id text modify list Tasks float obj instance Equal Reflection Wri
@nemesisqp
nemesisqp / init.sh
Created December 3, 2017 08:35
script-ea-bash
#!/bin/bash
settingFile=setting.conf
logFile=result
. $settingFile
fullGitHttpUrl="${gitHttpUrl:0:8}$username:$password@${gitHttpUrl:8}"
repoNameWithDotGit=`basename "$fullGitHttpUrl"`
repoName="${repoNameWithDotGit:0:-4}"
'use strict';
const PROD = !!(require('yargs').argv.production);
console.log(PROD ? 'production' : 'dev', 'mode');
let site = require('./site');
const gulp = require('gulp');
let browser;
const Metalsmith = require('metalsmith');
const Handlebars = require('handlebars');
! function(a, b) {
"object" == typeof exports && "object" == typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define([], b) : "object" == typeof exports ? exports.jwplayer = b() : a.jwplayer = b()
}(this, function() {
return function(a) {
function b(c) {
if (d[c]) return d[c].exports;
var e = d[c] = {
exports: {},
id: c,
loaded: !1
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
nvm_has() {
type "$1" > /dev/null 2>&1
}
nvm_install_dir() {
printf %s "${NVM_DIR:-"$HOME/.nvm"}"
@nemesisqp
nemesisqp / helper.js
Created February 14, 2017 04:46
handlebars compareTime helper
Handlebars.registerHelper('compareTime', function(lhs, operator, rhs, options) {
/*eslint eqeqeq: 0*/
if (arguments.length < 4) {
throw new Error('handlebars Helper {{compareTime}} expects 4 arguments');
}
var a = rhs, b = rhs;
if (!moment.isMoment(a)) a = moment(lhs);
if (!moment.isMoment(b)) b = moment(rhs);
@nemesisqp
nemesisqp / mvm.lua
Last active August 29, 2015 14:08 — forked from usysrc/mvm.lua
local MEM = {}
local PC = 0
local registers = {
A = 0,
B = 0,
C = 0,
D = 0
}
local fetch = function()
@nemesisqp
nemesisqp / lpeg_unicode.lua
Created June 17, 2012 15:33 — forked from daurnimator/lpeg_unicode.lua
Adding UTF8 support for lpeg
local lpeg = require "lpeg"
local utf8_codepoint
do
-- decode a two-byte UTF-8 sequence
local function f2 (s)
local c1, c2 = string.byte(s, 1, 2)
return c1 * 64 + c2 - 12416
end