Skip to content

Instantly share code, notes, and snippets.

@mtrl
mtrl / A4TPostBuildEvents
Created August 13, 2015 10:44
A4TPostBuildEvents for plugin upload
<Target Name="A4TPostBuildEvents" AfterTargets="Build">
<Exec Command="Install-A4T-Plugin.bat $(OutDir)$(TargetName).a4t" />
</Target>
@mtrl
mtrl / Install-A4T-plugin.bat
Last active August 29, 2015 14:27
Install-A4T-plugin.bat
echo "Installing plugin from %1"
"c:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy ByPass -file Install-A4T-Plugin.ps1 %1 -CmsHostname "http://[hostname]/" -Username [cme username] -Password [password]
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>OracleDB</short>
<description>Service for connection to Oracle database. If you plan to provide a database connection on this host, enable this option.</description>
<port protocol="tcp" port="1521"/>
</service>
@mtrl
mtrl / git-post-receive.coffee
Last active August 29, 2015 14:22
A very simple Git post receive hook and coffeescript script for hubot notifications on Git deployments
# The Hubot coffee (name it git-post-receive.coffee) and put it in [hubot]/scripts/ and enable in hubot-scripts.json
# Description:
# Notifies a chat room of a git post receive hook POST notification
#
# Dependencies:
# None
#
# Configuration:
#
@mtrl
mtrl / flv2mp4.sh
Created March 31, 2015 13:30
Convert all flvs to mp4 using ffmpeg
#!/bin/bash
# do a wc -l > flvs.txt from the root first then doit.sh flvs.txt
while read line
do
name=$line
outputfile=${name/\.\/0/\.\/mpgs\/}
dir=$(dirname "$outputfile")
mkdir -p $dir
out=${outputfile/\.flv/\.mp4}
@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
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 / rightmove-keyword-search.md
Last active August 29, 2015 14:12
Rightmove keyword search
@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
#!/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 "+----------------------+";