Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
sudo modprobe -r iwlmvm
sudo modprobe iwlwifi
sudo service network-manager restart
@weivall
weivall / exercise.tour.go
Created May 28, 2016 15:28 — forked from zyxar/exercise.tour.go
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
#!/usr/bin/env bash
# Settings
peak_rate=15
log_file="/tmp/debug_processes.log"
log_writing_duration="10s"
available_memory=`cat /proc/meminfo | grep MemAvailable: | awk '{print $2}'`
total_memory=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'`
curl -sSk 'https://secure.php.net/releases/index.php?json' | php -r '$v = json_decode(file_get_contents("php://stdin"),1); echo $v[7]["version"];'
#!/bin/bash
sudo modprobe -r iwlmvm
sudo modprobe iwlwifi
sudo service network-manager restart
@weivall
weivall / pthreads.md
Created November 19, 2015 21:49 — forked from krakjoe/pthreads.md
pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
@weivall
weivall / gist:d978419b1ebc2bdaf3bc
Created November 10, 2015 13:37 — forked from j3j5/gist:8b3e48ccad746b90a54a
Adyen Test Card Numbers
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
06/2016 OR 08/2018 737 7373
@weivall
weivall / gist:94925689cd590513a4a5
Created September 30, 2015 08:00
Nginx compilation with js module
# Obtain the latest source for NGINX from http://nginx.org/en/download.html
$ wget http://nginx.org/download/nginx-1.9.5.tar.gz
$ tar -xzvf nginx-1.9.5.tar.gz
# Obtain the development sources for nginScript
$ hg clone http://hg.nginx.org/njs
# Build and install NGINX
$ cd nginx-1.9.5
$ ./configure \
@weivall
weivall / gist:21e5cf991b6774e474a5
Last active August 29, 2015 14:27
extjs debug
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent =
Ext.util.Observable.prototype.fireEvent.createInterceptor(function() {
console.log(this.name);
console.log(arguments);
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
@weivall
weivall / gist:3d3d9769bbd59c8d6339
Created July 13, 2015 22:14
Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host
sudo apt-get install bridge-utils
pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
sudo service docker start