Skip to content

Instantly share code, notes, and snippets.

@mtrl
mtrl / hobbyking-userscript-hide-daily-video.js
Last active December 27, 2015 18:19
A little tampermonkey/greasemonkey script to hide the daily video on HobbyKing.com
// ==UserScript==
// @name Remove HobbyKing auto play daily video
// @namespace http://mtrl.co.uk/
// @updateURL https://gist.github.com/mtrl/7369221/raw/hobbyking-userscript-hide-daily-video.js
// @version 1.0.3
// @description Removes the annoying autoplay daily video from the home page of HobbyKing.com
// @match http://hobbyking.com/hobbyking/store/index.asp
// @match http://www.hobbyking.com/hobbyking/store/index.asp
// ==/UserScript==
@mtrl
mtrl / tampermonkey-rightmove-full-screen.js
Last active December 30, 2015 17:29
Tampermonkey script for rightmove.co.uk to make the search results display full screen
// ==UserScript==
// @name rightmove.co.uk full screen width
// @description Shows rightmove.co.uk search results at full screen width
// @updateURL https://gist.github.com/mtrl/7861280/raw/tampermonkey-rightmove-full-screen.js
// @version 1.0.1
// @match http://www.rightmove.co.uk/property-for-sale/property*
// @match http://www.rightmove.co.uk/property-to-rent/property/*
// @copyright 2013, Mark Williams
// ==/UserScript==
function addGlobalStyle(css) {
--[[
KAP UAV Exposure Control Script v1.5
-- Released under GPL by waterwingz and wayback/peabody
http://chdk.wikia.com/wiki/KAP_%26_UAV_Exposure_Control_Script
@title KAP UAV 1.5
@param i Shot Interval (sec)
@default i 15
@range i 2 120
@param s Total Shots (0=infinite)
git rm -r --cached .;git add .;git commit -m ".gitignore is now working"
@mtrl
mtrl / Phonegap iOS hide status bar
Created May 2, 2014 21:46
Hide Status bar on iOS with phonegap application
To hide statusbar, add the following code in the file MainViewController.m under the function -(void)viewDidUnload
- (BOOL)prefersStatusBarHidden
{
return YES;
}
#!/bin/sh
echo "+--------------------------+";
echo "| Uninstalling application |"
echo "+--------------------------+";
adb devices | tail -n +2 | cut -sf 1 | xargs -I {} adb -s {} uninstall [com.your.app/.Name]
echo "+------------------------+";
echo "| Installing application |";
echo "+------------------------+";
adb devices | tail -n +2 | cut -sf 1 | xargs -I {} adb -s {} install [path-to-apk]
echo "+----------------------+";
@mtrl
mtrl / Create-garden-timelapse.sh
Created June 6, 2014 12:57
Create garden timelapse
#Add EXIF datetime stamp to all images
for i in *;do convert $i -pointsize 72 -fill white -annotate +100+100 "date: %[exif:DateTimeOriginal]" $i;done
# Convert to video file
ffmpeg -framerate 6 -start_number 24 -i IMG_00%2d.jpg -s 1920x1080 -vb 10000k -vcodec mpeg4 6fps.mp4
@mtrl
mtrl / rightmove-keyword-search.md
Last active August 29, 2015 14:12
Rightmove keyword search
Bundle path was set to: /root/db/reconstruction-with-image-size-1200/pmvs/bundle.rd.out
Images path was set to: /root/db/
Images list path was set to: /root/db/reconstruction-with-image-size-1200/pmvs/list.rd.txt
Input model path was set to: /root/db/reconstruction-with-image-size-1200-results/odm_mesh-0000.ply
Output folder path was set to: /root/db/reconstruction-with-image-size-1200-results/odm_texturing/
The texture resolution was set to: 4096
The resized resolution used in bundler was set to: 1200
The resolution to texture with was set to: 3600
Log file path was set to: /root/db/reconstruction-with-image-size-1200/odm_texturing/odm_texturing_log.txt
Successfully loaded 199912 polygons from file.
@mtrl
mtrl / WordPress permissions
Created March 3, 2015 09:13
WordPress permissions
From http://www.smashingmagazine.com/2014/05/08/proper-wordpress-filesystem-permissions-ownerships/
sudo find . -type f -exec chmod 644 {} +
sudo find . -type d -exec chmod 755 {} +
sudo chmod 600 wp-config.php