Skip to content

Instantly share code, notes, and snippets.

View mvaneijgen's full-sized avatar

Mitchel van Eijgen mvaneijgen

View GitHub Profile
{"latitude":52.3886,"longitude":4.6397,"timezone":"Europe/Amsterdam","offset":1,"currently":{"time":1425917589,"summary":"Clear","icon":"clear-day","precipIntensity":0,"precipProbability":0,"temperature":53.07,"apparentTemperature":53.07,"dewPoint":46.54,"humidity":0.78,"windSpeed":6.97,"windBearing":180,"visibility":6.21,"cloudCover":0.2,"pressure":1024.42,"ozone":319.79},"hourly":{"summary":"Drizzle starting tonight, continuing until tomorrow morning.","icon":"rain","data":[{"time":1425916800,"summary":"Clear","icon":"clear-day","precipIntensity":0,"precipProbability":0,"temperature":53.47,"apparentTemperature":53.47,"dewPoint":46.95,"humidity":0.78,"windSpeed":6.79,"windBearing":178,"visibility":6.21,"cloudCover":0.18,"pressure":1024.5,"ozone":319.82},{"time":1425920400,"summary":"Partly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":51.66,"apparentTemperature":51.66,"dewPoint":45.09,"humidity":0.78,"windSpeed":7.63,"windBearing":186,"visibility":6.21,"cloudCover
@mvaneijgen
mvaneijgen / gist:4121efb8fac4833454fa
Created March 16, 2015 18:58
Trying to install Hubot terminal erros
npm WARN locking Error: EACCES, open '/Users/mvaneijgen/.npm/_locks/hubot-google-images-b597f0e6cc957660.lock'
npm WARN locking at Error (native)
npm WARN locking /Users/mvaneijgen/.npm/_locks/hubot-google-images-b597f0e6cc957660.lock failed { [Error: EACCES, open '/Users/mvaneijgen/.npm/_locks/hubot-google-images-b597f0e6cc957660.lock']
npm WARN locking errno: -13,
npm WARN locking code: 'EACCES',
npm WARN locking path: '/Users/mvaneijgen/.npm/_locks/hubot-google-images-b597f0e6cc957660.lock' }
npm ERR! Darwin 14.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "hubot" "hubot-scripts" "hubot-diagnostics" "hubot-help" "hubot-heroku-keepalive" "hubot-google-images" "hubot-google-translate" "hubot-pugme" "hubot-maps" "hubot-redis-brain" "hubot-rules" "hubot-shipit" "hubot-youtube" "--save"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
<?php
/**
* No Search Results Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
?>
-- delete any usermeta specific to the other subsites
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_';
-- duplicate the wp_usermeta structure in a working data table,
-- but add a unique index for filtering out duplicates
create table _fix_usermeta like wp_usermeta;
alter table _fix_usermeta add unique(user_id, meta_key);
-- copy the site-specific usermeta, keeping only the last of each duplicate
insert into _fix_usermeta
li.filterall.filter-blog.eg-mve-custom-wrapper.eg-post-id-491.tp-esg-item.itemtoshow.isvisiblenow
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@mvaneijgen
mvaneijgen / SafariPrivate.scpt
Last active August 29, 2015 14:24
Open Safari Private tab
tell application "Safari"
activate
end tell
tell application "Safari"
activate
end tell
tell application "System Events"
tell process "Safari"
options =
city : "Haarlem" # default city in case location detection fails
region : "NH" # default region in case location detection fails
units : 'c' # c for celcius. f for Fahrenheit
staticLocation: false # set to true to disable autmatic location lookup
appearance =
iconSet : 'original' # "original" for the original icons, or "yahoo" for yahoo icons
color : '#fff' # configure your colors here
darkerColor : 'rgba(#fff, 0.8)'
command: "ps axro \"pid, %cpu, ucomm\" | awk 'FNR>1' | head -n 3 | awk '{ printf \"%5.1f%%,%s,%s\\n\", $2, $3, $1}'"
refreshFrequency: 20000
style: """
bottom: 30px
left: 30px
color: #fff
font-family: Helvetica Neue
@mvaneijgen
mvaneijgen / Screencast.scpt
Last active February 3, 2017 15:39
Apple script that toggles Do not disturb mode and scales the display resolution. This is build for a late 2011 13" MBP with a external monitor called `SyncMaster` see script.
-- Launch "System Preferences", open the "Displays" options and change to the "Display" tab
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.displays"
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
end tell
local indexToUse
-- Now lets make the necessary changes