Skip to content

Instantly share code, notes, and snippets.


A.A monolithed

View GitHub Profile
monolithed /
Created Aug 14, 2018 — forked from graste/
strace process for network and memory and other syscalls

File activity

strace -e trace=file -fp PID (file) or strace -e trace=desc -fp PID (file descriptors)

Common calls:

  • access
  • close – close file handle
  • fchmod – change file permissions
  • fchown – change file ownership
View html5-video-streamer.js
* Inspired by:
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
View index.js
// Usage
<Provider store={store}>
<Main />
monolithed / file.js
Created Apr 24, 2017 — forked from alexcorvi/file.js
JSX without react
View file.js
var React = {
createElement: function (tag, attrs, children) {
var e = document.createElement(tag);
// Add attributes
for (var name in attrs) {
if (name && attrs.hasOwnProperty(name)) {
var v = attrs[name];
if (v === true) {
e.setAttribute(name, name);
View openssl pkcs8 -topk8 -nocrypt -in privkey.pem -out privkey2.pem 76
openssl genrsa -out privkey.pem 768
openssl pkcs8 -topk8 -nocrypt -in privkey.pem -out privkey2.pem
View colortext.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
monolithed / index.html
Last active Feb 1, 2017 — forked from iketari/index.html
Object.keys vs #jsbench #jsperf ( #jsbench #jsperf
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>Object.keys vs #jsbench #jsperf</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
monolithed / nginx.conf
Created Dec 24, 2015 — forked from micho/nginx.conf
nginx config for http/https proxy to localhost:3000
View nginx.conf
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate:
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
monolithed / index.js
Created Dec 7, 2015 — forked from lygaret/index.js
ES6 Quasi-Literal for JSX
View index.js
define(function(require) {
var React = require('react');
var paramRegex = /__(\d)+/;
var parser = new DOMParser();
var errorDoc = parser.parseFromString('INVALID', 'text/xml');
var errorNs = errorDoc.getElementsByTagName("parsererror")[0].namespaceURI;
// turns the array of string parts into a DOM
// throws if the result is an invalid XML document.
monolithed / gist:7a0ffc4e94ffc62dee84
Last active Sep 11, 2015 — forked from yano3/gist:1378948
git commit --amend --reset-author
View gist:7a0ffc4e94ffc62dee84
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global "Your Name"
git config --global
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author