View describe-mysql-5.7.17-user-table
+------------------------+-----------------------------------+------+-----+-----------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+-----------------------------------+------+-----+-----------------------+-------+
| Host | char(60) | NO | PRI | | |
| User | char(32) | NO | PRI | | |
| Select_priv | enum('N','Y') | NO | | N | |
| Insert_priv | enum('N','Y') | NO | | N | |
| Update_priv | enum('N','Y') | NO | | N | |
| Delete_priv | enum('N','Y') | NO | | N | |
| Create_priv | enum('N','Y')
View mysql.sh
#!/bin/bash
set -x
set -e
export DEBIAN_FRONTEND=noninteractive
sudo apt-get --purge autoremove -y mysql-server-5.6
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
echo mysql-apt-config mysql-apt-config/select-product select Apply | sudo debconf-set-selections
View private.xml
<?xml version="1.0"?>
<root>
<appdef>
<appname>Terminal</appname>
<equal>com.apple.Terminal</equal>
<equal>iTerm</equal>
<equal>net.sourceforge.iTerm</equal>
<equal>com.googlecode.iterm2</equal>
</appdef>
<item>
View intents.java
fm.player.playback.play // play/resume
fm.player.playback.pause // pause
fm.player.playback.jumpforward // jump forward
fm.player.playback.jumpback // jump back
fm.player.playback.next // skip to next episode
fm.player.playback.previous // skip back to previous episode
fm.player.playback.stop // stop
fm.player.playback.toggle // toggle play/pause state
View webcheck.sh
# WEB
# e.g. webcheck /about google.com google.co.uk
# will check each host in parallel, multiple times
function webcheck {
trap handle_sigint SIGINT
set +m
path=$1
shift
hosts=$*
for host in $hosts ; do
View console.rb
# Run this on console to check asset path will work
JsAssets::List.exclude = ['boot.js'] ; JsAssets::List.allow = %w(app.js models/*.js prod-*.css); `rm -fr tmp/cache`; JsAssets::List.fetch
View assign.coffee
# adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
# with help from JS2Coffee
# https://codepen.io/mahemoff/pen/xOBgdk?editors=0010
if typeof Object.assign != 'function'
Object.assign = (target) ->
index = 1
while index < arguments.length
View redis-delete-keys.rb
class Redis::Namespace
def delete_all_keys
keys = self.keys '*'
self.del keys if keys.present?
end
end
funky_redis = Redis::Namespace.new('funky', redis: Redis.new(url: '...'))
funky_redis.set 'count', 10 # makes funky:10 entry
funky_redis.delete_all_keys # deletes funky:10 entry
View safe_strip.rb
class String
# performance hack - memoize these regexps
SPACE_8_RE = Regexp.new('[[:space:]]'.encode('UTF-8'))
SPACE_16_RE = Regexp.new('[[:space:]]'.encode('UTF-16LE'))
def safe_strip
if self.encoding=='UTF-8'
self.gsub SPACE_8_RE, ''
elsif self.encoding=='UTF-16'
View README.md
  1. Install Chrome freak extension (https://chrome.google.com/webstore/detail/control-freak/jgnchehlaggacipokckdlbdemfeohdhc?hl=en)
  2. Visit Play store developer console and open an app listing
  3. Open control freak icon beside URL bar (look for the gears/setting icon on top-right of browser)
  4. In control freak, click on "This domain (play.google.com)
  5. In control freak, copy the CSS, JS, and Libs from above here
  6. Hit save and exit control freak
  7. Reload the page! App listing should now include %ge.