Skip to content

Instantly share code, notes, and snippets.

For the flavor base:

  • 15 dried japones chiles or 10 dried chiles de árbol or 3 Tbs. sambal oelek
  • 1-1/2 cups sliced shallots (from 4 large shallots)
  • 2 Tbs. sliced garlic
  • 1 Tbs. sliced peeled fresh ginger
  • 1 Tbs. chopped fresh or frozen and thawed galangal (optional)

For the whole spice blend:

@signalnine
signalnine / reconstruct_crontab.py
Created August 26, 2023 00:45
reconstruct crontab from syslog
from collections import defaultdict
from datetime import datetime
from collections import Counter
def infer_cron_schedule(timestamps):
# Sort timestamps
timestamps.sort()
# Calculate intervals in seconds
intervals = [(timestamps[i+1] - timestamps[i]).seconds for i in range(len(timestamps)-1)]
#!/bin/bash
# Set the list of small words to ignore
ignore_list="a an and but or nor the"
# Loop through all files in the current directory
for file in *
do
# Split the file name and extension into separate variables
filename="${file%.*}"
#!/usr/bin/env python
import os
allowance = 0
def dansay(words):
print words
os.system("say -v daniel %s" % words)
return
with open('diego_allowance.txt','r') as f:
---
- name: template everything for hawking config files
template: src=${item.src} dest=${item.dest}
with_items:
- { src: 'templates/{{ agari_role }}.action_mailer.yml', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/action_mailer.yml'
- { src: 'templates/{{ agari_role }}.archived.rb', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/archived.rb'
- { src: 'templates/{{ agari_role }}.aws.yml', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/aws.yml'
- { src: 'templates/{{ agari_role }}.chewy.yml', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/chewy.yml'
- { src: 'templates/{{ agari_role }}.data_sources', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/data_sources'
- { src: 'templates/{{ agari_role }}.database.yml', dest: '/usr/local/agari/hawking/{{ agari_env }}/shared/system/database.yml'
@signalnine
signalnine / gist:37344a4b0f78af7d1c32
Created February 10, 2015 18:33
fix unallocated shards on ElasticSearch
NODE="search-07.prod.agari.com"
IFS=$'\n'
for line in $(curl -s 'localhost:9200/_cat/shards' | fgrep UNASSIGNED); do
INDEX=$(echo $line | (awk '{print $1}'))
SHARD=$(echo $line | (awk '{print $2}'))
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [
{
"allocate": {
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'

Keybase proof

I hereby claim:

  • I am signalnine on github.
  • I am gabeortiz (https://keybase.io/gabeortiz) on keybase.
  • I have a public key whose fingerprint is D9E0 C6D4 2081 375E BE5A D4D2 0BAF 8BA8 9ED6 CB64

To claim this, I am signing this object: