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
(function webpackUniversalModuleDefinition(root, factory) { | |
if(typeof exports === 'object' && typeof module === 'object') | |
module.exports = factory(); | |
else if(typeof define === 'function' && define.amd) | |
define("csp", [], factory); | |
else if(typeof exports === 'object') | |
exports["csp"] = factory(); | |
else | |
root["csp"] = factory(); | |
})(this, function() { |
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
node_modules |
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
Reveal.configure({ | |
keyboard: { | |
40: 'next', | |
38: 'prev' | |
} | |
}); |
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
var pkgPath = '<path to package.json file>'; | |
var david = require('david'), | |
chalk = require('chalk'), | |
fs = require('fs'); | |
var manifest = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); | |
david.getDependencies(manifest, function (er, deps) { | |
console.log('\n', chalk.cyan('latest dependencies information for', manifest.name)); |
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
node_modules/ | |
output/ |
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
#include <boost/version.hpp> | |
#include <iostream> | |
#include <iomanip> | |
int main() | |
{ | |
std::cout << "Using Boost " | |
<< BOOST_VERSION / 100000 << "." // major version | |
<< BOOST_VERSION / 100 % 1000 << "." // minor version | |
<< BOOST_VERSION % 100 // patch level |
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 argparse | |
parser = argparse.ArgumentParser(description='Move subtitles in MicroDVD format.') | |
parser.add_argument('input_file', metavar='input_file', type=str, help='input file') | |
parser.add_argument('output_file', metavar='output_file', type=str, help='output file') | |
parser.add_argument('frames_diff', metavar='frames_diff', type=float, help='frames difference (check MicroDVD format)') | |
parser.add_argument('--ignore-lines', dest='ignore_lines', type=int, default=0, help='number of lines to be ignored') | |
args = parser.parse_args() | |
import re |
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 os | |
parent_pid = os.getpid() | |
print "[parent] starts PID: %d" % (parent_pid, ) | |
forked_pid = os.fork() | |
if forked_pid == 0: | |
print "[child] child process can't use os.fork() PID, since it's %d" % (forked_pid, ) | |
print "[child] but it can reevaluate os.getpid() to get it's own PID: %d" % (os.getpid(), ) | |
else: |
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
var Class = function(base){ | |
if (typeof base.construct !== "function") | |
throw new TypeError("class definition has to define 'construct' function"); | |
return function() { | |
// copy all methods | |
for (var prop in base) { | |
if (base.hasOwnProperty(prop) && base[prop] !== base.construct) { | |
this[prop] = base[prop]; | |
} | |
} |
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
#!/usr/bin/php -q | |
<?php | |
set_time_limit(0); | |
ob_implicit_flush(); | |
if ($argc != 2) | |
die("Simple Time Server (C) 2013 Tomasz Ducin\n" . | |
"Invalid parameters passed\n" . | |
"Run:\n\t./time-server.php <port>\n" . |