Skip to content

Instantly share code, notes, and snippets.

Page faults left and right

David Jimenez dvejmz

Page faults left and right
View GitHub Profile
View sample-xorg.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
dvejmz / mandelbrot.go
Created Apr 29, 2017
Mandelbrot fractal implementation in Go as described in The Go Programming Language, Kernighan et al.
View mandelbrot.go
package main
import (
dvejmz /
Last active Jun 6, 2017
Pull all git repositories in folder concurrently
#!/usr/bin/env bash
# pull-all
# AUTHOR: David J. Sequero
# Pull latest changes from all repositories within a directory.
# - GNU parallel
dvejmz /
Created Oct 17, 2017
Wrapper script to use w3mimgdisplay to render images on a terminal
# z3bra -- 2014-01-21
if [[ $# != 2 ]]; then
echo "Insufficient arguments."
exit 1
dvejmz / ch4-insertion-sort.c
Created Nov 15, 2017
Simple insertion sort
View ch4-insertion-sort.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int issort(
void *data,
int size,
int esize,
int (*compare)(const void *key1, const void *key2)
) {
dvejmz / pre-commit
Created Dec 8, 2017
phpcs pre-commit git hook script
View pre-commit
# Pre-commit Git hook.
# Runs PHP CS on PHP files.
# Code slightly modified from the original
# If you absolutely must commit without testing,
# use: git commit --no-verify
# This will check only staged files to be commited.
dvejmz /
Created Jul 3, 2018
Add an arbitrary block of text to a file
#!/bin/env bash
## Example usage:
## ../ 'matchtext' index.html
## find . -name "*.html" -exec ../ 'matchtext' '{}' \;
INSERT=$(cat <<'EOF'
<text here>
dvejmz /
Created Aug 3, 2018
Get the latest tag for every git repo in a directory
#!/usr/bin/env bash
function is_git_repo() {
ls .git &> /dev/null
function get_latest_tag_for_repo() {
pushd ${1} &> /dev/null
local is_git_repo=$?
dvejmz /
Created Mar 3, 2019
ECS instance with EIP auto-association and EBS volume mounting
echo ECS_CLUSTER=openvpn >> /etc/ecs/ecs.config;echo ECS_BACKEND_HOST= >> /etc/ecs/ecs.config;
mkdir -p /ecs-data/openvpn-data
echo "/dev/sdf /ecs-data/openvpn-data ext4 defaults 0 2" >> /etc/fstab
mount -a
yum install -y python36
curl -O
export PATH=/usr/local/bin:$PATH
pip install awscli
#!/usr/bin/env bash
set -e
# In a terminal window, locate this file in your computer and run the following command
# $ chmod +x
# Then invoke the script (the leading './' is important)
# $ ./
# The script will prompt you at several points to enter your sudo (admin) password.
You can’t perform that action at this time.