Skip to content

Instantly share code, notes, and snippets.

🐧
Page faults left and right

David Jimenez dvejmz

🐧
Page faults left and right
Block or report user

Report or block dvejmz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brownstein
brownstein / find-broken-eslint-scope-installs.js
Last active Apr 13, 2019
Quick script to scan a directory of projects for infected eslint-scope installs (rev 3.7.2). Runs in node 8+.
View find-broken-eslint-scope-installs.js
"use strict";
const path = require("path");
const fs = require("fs");
const { exec } = require("child_process");
const PROJECTS_DIR = __dirname;
const PACKAGE_NAME = "eslint-scope";
const BAD_REVISIONS = [
"3.7.2"
];
@magnetikonline
magnetikonline / README.md
Last active Jul 9, 2019
AWS CloudFormation YAML template - appending to list parameter types.
View README.md

AWS CloudFormation YAML template - appending to list parameter types

Documenting this here, as I often forget (what I have found) is the best way to do this at the moment.

For example, you have a list of two existing security groups given to a stack and wish to create (and use) a third - attaching all to an ALB:

AWSTemplateFormatVersion: "2010-09-09"
Description: "Example template"

Parameters:
@benyanke
benyanke / fidget.sh
Last active Nov 5, 2017
Bash fidget spinner
View fidget.sh
# Bash Fidget Spinner
# Could also be included in a bashrc file
fidget() {
start_time="0.02";
spin_efficiency="0.99";
end_time="3";
time="$start_time";
printf "\e[92mPress any key to give another spin...\n\n";
@GLMeece
GLMeece / latency_numbers.md
Last active Sep 18, 2019
Latency Numbers Every Programmer Should Know - MarkDown Fork
View latency_numbers.md

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@MichaelPote
MichaelPote / himawari.ps1
Created Feb 3, 2016
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
View himawari.ps1
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@soarez
soarez / ca.md
Last active Sep 18, 2019
How to setup your own CA with OpenSSL
View ca.md

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@miguelmota
miguelmota / README.md
Last active Sep 19, 2019
Multiple accounts with Mutt E-Mail Client (gmail example)
View README.md

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@garethrees
garethrees / plot.p
Last active Jul 11, 2019
Graphing apache benchmark results with gnuplot
View plot.p
# Output to a jpeg file
set terminal jpeg size 1280,720
# Set the aspect ratio of the graph
set size 1, 1
# The file to write to
set output "timeseries.jpg"
# The graph title
@gabrielfalcao
gabrielfalcao / gist:4216897
Created Dec 5, 2012
TCP socket error codes
View gist:4216897
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active Sep 18, 2019
How to automatically prepend git commit with a branch name
View prepare-commit-msg.sh
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
You can’t perform that action at this time.