Skip to content

Instantly share code, notes, and snippets.

View eznj's full-sized avatar
👾

eznj

👾
View GitHub Profile
@mrdoob
mrdoob / gist:1325393
Created October 30, 2011 02:48
ffmpeg: recording the screen.
ffmpeg -f x11grab -b 1M -bt 2M -r 30 -s 512x512 -i :0.0+1,53 -an kinect.webm
@mrdoob
mrdoob / gist:1326080
Created October 30, 2011 16:25
modified glview.c
/*
* This file is part of the OpenKinect Project. http://www.openkinect.org
*
* Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
* for details.
*
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public License,
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
* or the following URLs:
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 5, 2024 13:48
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@eznj
eznj / Apache mod_gizip stuff gzip
Created January 15, 2013 07:37
Apache 1.3 Gzip mod_gzip stuff..
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
mod_gzip_can_negotiate Yes
mod_gzip_add_header_count Yes
mod_gzip_send_vary Yes
mod_gzip_command_version '/mod_gzip_status'
mod_gzip_min_http 1000
mod_gzip_minimum_file_size 300
@eznj
eznj / star_wars.ino
Last active September 26, 2023 18:24
Arduino Star Wars Song
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
const int b = 466;
const int cH = 523;
@jamesonjlee
jamesonjlee / gist:11271979
Created April 24, 2014 22:40
dynamodb local setup
sudo apt-get install openjdk-7-jre-headless -y
cd /home/ubuntu/
mkdir -p dynamodb
cd dynamodb
wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest
tar -xvzf dynamodb_local_latest
rm dynamodb_local_latest
mv dynamodb_local_*/ dynamodb/
@mandiwise
mandiwise / Update remote repo
Last active May 28, 2024 03:03
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@jkras
jkras / newrelic-infra.config
Created January 2, 2017 23:08
New Relic Infrastructure Server Config file for AWS Elastic Beanstalk
files:
"/home/ec2-user/new_relic_servers_setup.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
printf "license_key: $NEW_RELIC_LICENSE_KEY" | sudo tee /etc/newrelic-infra.yml
printf "[newrelic-infra]\nname=New Relic Infrastructure\nbaseurl=http://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64\nenable=1\ngpgcheck=0" | sudo tee /etc/yum.repos.d/newrelic-infra.repo
yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
@ageis
ageis / systemd_service_hardening.md
Last active June 5, 2024 03:54
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@eznj
eznj / approver.yml
Last active August 4, 2020 20:14
SQS structure sign-off service
provider: # s3, gcs
storage_location: # s3 location, gcs location
version: <generated schema vers>
approvals:
require_staging: true
required: 2
total: 1
team_a: 0
team_b: 1
structure: