This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync on windows working correctly with vagrant: | |
install and add this to the PATH https://www.itefix.net/dl/cwRsync_5.4.1_x86_Free.zip (make sure that this is before git on the path, otherwise ssh wont work correctly) | |
You'll also have to patch vagrant to run this correctly (https://github.com/mitchellh/vagrant/issues/3230 ): | |
find | |
hostpath = Vagrant::Util::Platform.cygwin_path(hostpath) | |
and change it to | |
hostpath = "/cygdrive" + Vagrant::Util::Platform.cygwin_path(hostpath) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Forms; | |
public static class ClipboardFusionHelper | |
{ | |
public static string ProcessText(string text) | |
{ | |
string name = "ClipboardFusion Saved Picture"; | |
if (Clipboard.ContainsImage()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# From: http://weblog.latte.ca/blake/employment/mozilla/thunderbird/gitOutgoing.html | |
git push --dry-run $1 2>&1 | awk '/^ / {print $1}' | xargs git log --graph --abbrev-commit --date=relative --pretty='format:%Cred%h%Creset - %s %Cgreen(%cr) %C(yellow)<%an>%C(reset)%C(white).' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -an |find /i "listening" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------ | |
How to setup git based push to live webserver on windows with apache | |
------------------ | |
1) Install http://code.google.com/p/msysgit/ | |
2) Setup your git directories | |
# Setup a base git directory | |
mkdir c:/server/git | |
git init --bare www.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to install wkhtmltopdf on centos 64bit | |
yum install xz urw-fonts libXext openssl-devel libXrender | |
wget http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltopdf-0.10.0_rc1-static-amd64.tar.lzma&can=2&q= | |
xz -d wkhtmltopdf-0.10.0_rc1-static-amd64.tar.lzma | |
tar -xvf wkhtmltopdf-0.10.0_rc1-static-amd64.tar | |
cp wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf | |
#to test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick powershell script to find songs added in the last 20days and add them into winamp | |
cd "c:/music/folder" | |
foreach( $song in Get-Childitem –recurse | where-object {$_.lastwritetime –gt (Get-date).AddDays(-20) -and $_.extension -eq ".mp3"}){ | |
&'C:/Program Files (x86)/Winamp/winamp.exe' $song.fullname | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#splits a string into parts, and returns them, this uses a workaround to handle wide unicode characters | |
function unicode_split($str, $length){ | |
if(preg_match_all("/./u", $str, $results)){ | |
$splits = Array_chunk($results[0], $length); | |
$str_splits = Array(); | |
foreach($splits as $split){ | |
$str_splits[] = implode("", $split); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Matt Labrum | |
# quick and dirty ruby script to neaten grep input by grouping by filename + some formatting | |
# Example Usage: grep -r -n "TODO:" . | neatgrep.rb | |
# must be called with -n, script doesn't handle other cases | |
# | |
# Handy when using a bash alias, for example | |
# alias todo='grep -r -n "TODO:" . | neatgrep.rb' | |
# |