This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Script to prepare and restore full and incremental backups created with innobackupex-runner. | |
# | |
# This script is provided as-is; no liability can be accepted for use. | |
# | |
INNOBACKUPEX=innobackupex-1.5.1 | |
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX | |
TMPFILE="/tmp/innobackupex-restore.$$.tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C{ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <pthread.h> | |
static pthread_mutex_t lrand_mutex = PTHREAD_MUTEX_INITIALIZER; | |
void generate_uuid(char* buf) { | |
pthread_mutex_lock(&lrand_mutex); | |
long a = lrand48(); | |
long b = lrand48(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file managed by puppet | |
# | |
# Configuration file for varnish | |
# | |
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK | |
# to be set from this shell script fragment. | |
# | |
# Should we start varnishd at boot? Set to "yes" to enable. | |
START=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gdb varnishd | |
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04 | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://bugs.launchpad.net/gdb-linaro/>... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
pgrep php-fpm |while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"/root/fpm-traces/$pid.trc" 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node / Iquidus Explorer Setup for Dummies | |
Pulse Crypto is used in this example. | |
This Tutorial is going to create a Daemon (node) and install Explorer. | |
THIS IS NOT GOING TO CREATE A GUI CLIENT. | |
Follow the instructions in [whatever coin name] docs folder Unix build - some builds are different. | |
I setup this up on both Ubuntu 15.10 and 16.04 with no issues. | |
You can create an account on vultr and get $50 free to be used in 2 months. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
EXPLORERAPI=https://explorer.nycoin.community/api | |
BLOCKHIGHT=$(curl -s "$EXPLORERAPI/getblockcount") | |
calc(){ awk "BEGIN{ print $* }" ;} | |
counter=0 | |
echo "[" | |
for i in {2015..$BLOCKHIGHT..2016} | |
do | |
HASH=$(curl -s "$EXPLORERAPI/getblockhash?index=$i") | |
sleep .5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
EXPLORERAPI=https://explorer.nycoin.community/api | |
BLOCKHIGHT=$(curl -s "$EXPLORERAPI/getblockcount") | |
calc(){ awk "BEGIN{ print $* }" ;} | |
echo "[" | |
for i in {16376..$BLOCKHIGHT..16376} | |
do | |
HASH=$(curl -s "$EXPLORERAPI/getblockhash?index=$i") | |
sleep 1 | |
DATA=$(curl -s "$EXPLORERAPI/getblock?hash=$HASH") |
OlderNewer