Skip to content

Instantly share code, notes, and snippets.

@deviantintegral
deviantintegral / compress-tables.sh
Created April 12, 2012 17:27
Compress MySQL Tables
#!/usr/bin/env bash
# Compress MySQL tables on disk.
# Author: Andrew Berry, andrew.berry@lullabot.com
#
# Compress all tables in a MySQL InnoDB database using compression from the
# Barracuda table format. Tables have to already be in the Barracuda file
# format to actually compress tables, otherwise the table setting is ignored.
#
# innodb_file_per_table = 1 MUST be set in my.cnf for compression to work.
@terrywang
terrywang / config
Last active February 1, 2022 09:03
~/.ssh/config behind firewall (ssh via HTTP proxy) and faster session creation by reusing already established connection
# User ssh configuration file ~/.ssh/config
# Gist https://gist.github.com/terrywang/3997931
# man ssh_config for more information
# Inspired by the blog post below to fight the NSA
# https://stribika.github.io/2015/01/04/secure-secure-shell.html
# Outside of the firewall, with HTTPS proxy
# Package connect-proxy is required.
# Amazon EC2
@colindean
colindean / generate_bitcoin_address.sh
Last active October 12, 2023 23:45
Bitcoin address generator in bash
#!/bin/bash
#
# This is free and unencumbered software released into the public domain.
#
# Requires bc, dc, openssl, xxd
#
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z})
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$"
@warnergodfrey
warnergodfrey / Gemfile
Last active December 14, 2017 01:10
Instructions for running remote JMeter
source 'https://rubygems.org'
gem 'ruby-jmeter', github: 'lukeck/ruby-jmeter'
@jetsonhacks
jetsonhacks / Install LT4 21.1.md
Last active January 26, 2024 16:59
Install LT4 21.1 on Jetson TK1

For best results, you should read through the official NVIDIA documentation found on:

https://developer.nvidia.com/linux-tegra-rel-21

In particular, the Quick Start Guide.

For this process you will need:

  • A host desktop or laptop computer running Ubuntu Linux 12.04 is officially recommended. In practice, this may be a virtual machine, I have used VirtualBox in the past. Also, I've successfully flashed from Ubuntu Linux 14.04. Your mileage may vary.
  • Micro USB cable provided with the Jetson TK1 kit
  • Jetson TK1 and power supply
@amadio
amadio / emerge-mic
Created March 4, 2015 23:53
Simple script to cross-compile stuff for the Xeon Phi in a prefix
#!/bin/bash
MICDIR=${HOME}/mic
# must copy MIC libs to ${MICDIR}/opt/intel/lib
LIBFLAGS="-L${MICDIR}/opt/intel/lib -L${MICDIR}/usr/lib"
FEATURES='-news -binchecks' ROOT=/ EPREFIX=${MICDIR} \
CC=icc CXX=icpc MPI_C=mpiicc MPI_CXX=mpiicpc LD=xild AR=xiar \
CPPFLAGS="-I${MICDIR}/usr/include" \
@lisovy
lisovy / qemu_pci_pass_through.txt
Created April 11, 2015 20:21
Qemu PCI pass-through
How to use 'pci pass-through' to run Linux in Qemu accessing real Ath9k adapter
===============================================================================
# Boot kernel with 'intel_iommu=on'
# Unbind driver from the device and bind 'pci-stub' to it
echo "168c 0030" > /sys/bus/pci/drivers/pci-stub/new_id
echo 0000:0b:00.0 > /sys/bus/pci/devices/0000:0b:00.0/driver/unbind
echo 0000:0b:00.0 > /sys/bus/pci/drivers/pci-stub/bind
@rymawby
rymawby / stripe-credit-card-numbers.md
Last active June 14, 2024 04:34
Stripe test credit card numbers for use in development

#Test credit card numbers to use when developing with Stripe

4242424242424242 Visa

4012888888881881 Visa

4000056655665556 Visa (debit)

@amadio
amadio / libffi-3.2.1-k1om.patch
Last active July 17, 2021 16:27
Workaround for compiling libffi for K1OM architecture (Intel® Xeon Phi™)
diff -ur libffi-3.2.1.orig/src/raw_api.c libffi-3.2.1/src/raw_api.c
--- libffi-3.2.1.orig/src/raw_api.c 2016-08-11 10:02:18.561329225 -0300
+++ libffi-3.2.1/src/raw_api.c 2016-08-11 10:03:43.853948157 -0300
@@ -29,7 +29,7 @@
#include <ffi.h>
#include <ffi_common.h>
-#if !FFI_NO_RAW_API
+//#if !FFI_NO_RAW_API