Skip to content

Instantly share code, notes, and snippets.

@matiaslopezd
matiaslopezd / webhook.header.txt
Last active Aug 14, 2021
Woocommerce webhook payload and header example
View webhook.header.txt
expect 100-continue
content-length 1998
connection close
x-wc-webhook-delivery-id 36e520ebabc2fa725092ff4a47acedf2
x-wc-webhook-id 3
x-wc-webhook-signature 5poyFy4qB6fdvvT5pGbefZmfkpL48uD47F0WYwfmpo4=
x-wc-webhook-event created
x-wc-webhook-resource order
x-wc-webhook-topic order.created
x-wc-webhook-source https://www.website.com/
@stephenwoodford
stephenwoodford / sphinx.rb
Created Nov 1, 2018 — forked from korny/sphinx.rb
Sphinx Homebrew formula for MySQL 5.7
View sphinx.rb
class Sphinx < Formula
desc "Full-text search engine"
homepage "http://www.sphinxsearch.com"
url "http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz"
sha256 "6662039f093314f896950519fa781bc87610f926f64b3d349229002f06ac41a9"
head "https://github.com/sphinxsearch/sphinx.git"
bottle do
sha256 "b890cf523db9777c7d125842fd6b0a53fe9a7a5a4cb816389ba6f5ee6483c78d" => :high_sierra
sha256 "55ce34bdedf13946fa614bde50839d93135eae720f1021e2c87807d04515ab18" => :sierra
@decent-dev
decent-dev / slots-testnet-setup-instructions.md
Last active Feb 21, 2018
Instructions to setup a local Rinkeby node and run Decent.bet's Slots Testnet
View slots-testnet-setup-instructions.md

Decent.bet Slots Testnet Instructions

The decent.bet slots runs on the Rinkeby test network. Users are given options to use Infura's mainnet nodes or their local Geth node.

You can access the testnet by visiting the following URL: https://slots-testnet.decent.bet/

If you'd like to use your own local Geth node, follow the instructions below. For Mac OSX, you could follow our tutorial video. Otherwise, skip to the usage instructions

Setting up a local Rinkeby node

View clear-sidekiq-jobs.sh
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@tiagoengel
tiagoengel / noise-cancellation.sh
Last active Nov 3, 2021
Hiss / White / Static noise cancellation on Linux using Pulseaudio and Sox
View noise-cancellation.sh
#!/bin/bash
# You'll need to have sox, pavucontrol and alsa-utils installed, and the snd_aloop kernel module loaded.
# You can configure your system to load it on startup or load it manually with "sudo modprobe snd_aloop"
# Once this is script is running, you need to start recording audio in the application of your
# preference, open pavucontrol, go to the recording tab and change the recording source of that application
# to "Monitor of Loopback ..."
time=5
View git-logout
#!/bin/bash
# Logout current GitHub credentials and remove global user.name, user.email
echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase
git config --unset-all --global user.name
git config --unset-all --global user.email
@drewkerrigan
drewkerrigan / README.md
Last active Jun 6, 2021
Setting open files limit in OSX 10.11.3
View README.md

Download this gist, and then run:

chmod 755 open_files_limit_mac.sh
./open_files_limit_mac.sh

Restart the system, and then run:

@kostecky
kostecky / capistrano_haproxy_rolling_deploy.rb
Last active Mar 26, 2018
Capistrano rolling deploy with haproxy
View capistrano_haproxy_rolling_deploy.rb
# Create a map of the deploy server to the haproxy label
server 'A.A.A.A', proxy_label: 'server-01'
server 'B.B.B.B', proxy_label: 'server-02'
# Define our puppet proxy server(s) and role
server 'C.C.C.C', no_release: true, roles: [:proxy]
# We need to override deploy:symlink:linked_dirs
# No way around it - override deploy:symlink:release and rewrite it for rolling deploys
Rake::Task["deploy:symlink:release"].clear_actions
@djonsson
djonsson / install_elasticsearch_osx.md
Last active Apr 27, 2021
OS X installation instructions for Elasticsearch + Kibana + Marvel
View install_elasticsearch_osx.md

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ryancdotorg
ryancdotorg / frag32.py
Created Aug 20, 2015
A FAT32 fragmenter, because I am a horrible person.
View frag32.py
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)