Dairy & Eggs
• 400 mL heavy cream
• 400 mL whole milk
• 6 large pasteurized egg yolks
| #!/usr/bin/env ruby | |
| require 'pp' | |
| DIR = File.expand_path(__dir__) | |
| module Deprecations | |
| extend self | |
| PATTERN = /DEPRECATION WARNING: (?<message>.*) \(called from (?<source_method>.+) at (?<source_file>[\w\.\/]+):(?<source_line>\d+)/ |
| #!/bin/bash | |
| # | |
| # This script works on OS X with Homebrew Given a specific MySQL version this | |
| # script will ensure that version is installed, nothing incompatible is | |
| # blocking it from working, and the mysqld process responds to queries. | |
| # | |
| mysql_version=$1 | |
| if [[ -z "${mysql_version}" ]]; then | |
| echo "USAGE: ${0} MYSQL_VERSION_THAT_HOMEBREW_RECOGNIZES" | |
| echo "example: ${0} [email protected]" |
| function listDocs() { | |
| var folderid = '{any folder id}'; | |
| var folder = DriveApp.getFolderById(folderid) | |
| var contents = folder.getFiles(); | |
| var file; | |
| var files = []; | |
| while(contents.hasNext()) { |
| def whereami(): | |
| import traceback | |
| for stack_frame in traceback.extract_stack(): | |
| if stack_frame[3] == 'from IPython.terminal.embed import embed; embed()': | |
| line = stack_frame[1] | |
| file = stack_frame[0] | |
| break | |
| if not line: | |
| raise Exception("couldn't figure out the line number") |
I hereby claim:
To claim this, I am signing this object:
| def sql | |
| /\A\s*(SELECT|INSERT|UPDATE|DELETE).*(FROM|JOIN)\s*`?(my_interesting|tables)`?/ | |
| end | |
| def sql_frozen | |
| /\A\s*(SELECT|INSERT|UPDATE|DELETE).*(FROM|JOIN)\s*`?(my_interesting|tables)`?/.freeze | |
| end | |
| SQLo = /\A\s*(SELECT|INSERT|UPDATE|DELETE).*(FROM|JOIN)\s*`?(my_interesting|tables)`?/o | |
| SQL = /\A\s*(SELECT|INSERT|UPDATE|DELETE).*(FROM|JOIN)\s*`?(my_interesting|tables)`?/ | |
| SQLFrozen = /\A\s*(SELECT|INSERT|UPDATE|DELETE).*(FROM|JOIN)\s*`?(my_interesting|tables)`?/.freeze |
| #include <ruby.h> | |
| struct my_malloc { | |
| size_t size; | |
| void *ptr; | |
| }; | |
| static void | |
| my_malloc_free(void *p) { | |
| struct my_malloc *ptr = p; |
| %w(pry method_source coderay slop).each do |name| | |
| Dir["#{$GEM_HOME}/gems/#{name}-*"].each do |g| | |
| $LOAD_PATH << "#{g}/lib" | |
| end | |
| end | |
| require 'pry' |
| # In your code, right at the top of any source code file. | |
| trap 'PROF' do | |
| File.open("/tmp/profile-#{Time.current.to_f}", 'w') {|f| f.write caller(2).join("\n") } | |
| pid = $$ | |
| Thread.new { sleep 0.5; `kill -PROF #{pid}` } | |
| end | |
| # in a terminal | |
| while true; do | |
| sleep 0.1 |