Skip to content

Instantly share code, notes, and snippets.

View warthurton's full-sized avatar

Wayne Arthurton warthurton

View GitHub Profile
@echo off
nircmdc speak text "hello"
echo %errorlevel%
pause
nircmdc speak text "goodbye"
echo %errorlevel%
pause
@warthurton
warthurton / gist:6084142
Last active December 20, 2015 06:09
nircmd test
@echo off
setlocal enableextensions
call nircmdc speak text "hello"
echo %errorlevel%
pause
call nircmdc speak text "goodbye"
echo %errorlevel%
pause
@warthurton
warthurton / gist:6166746
Created August 6, 2013 17:44
Test gist
New test gist
@warthurton
warthurton / BrowsePeople.lsml.js
Last active December 27, 2015 10:09
LightSwitch HTML Commanding with TheLightSwitchToolbox.WebApiCommanding.Server
/// <reference path="../GeneratedArtifacts/viewModel.js" />
myapp.BrowsePerson.PeopleCommanding_ItemTap_execute = function (screen) {
$.post("../api/Command/FirstCommand",
{ Parameter1: screen.People.selectedItem.Id, Parameter2: screen.People.selectedItem.FirstName },
function (data) {
if (data != null) {
screen.CommandReturn = data.Parameter2.toString();
return true;
}
- (NSInteger)colorNumber
{
if (_colorNumber < 0) {
NSString *hashName = self.nickname.lowercaseString;
if ([RZUserDefaults() boolForKey:@"UUIDBasedNicknameColorHashing"]) {
hashName = [NSString stringWithUUID];
}
self.colorNumber = (hashName.hash % _colorNumberMax);
#!/usr/bin/ruby
# Example custom processor for use with Marked <http://markedapp.com> and Jekyll _posts
# It's geared toward my personal set of plugins and tags, but you'll get the idea.
# It turns
# {% img alignright /images/heythere.jpg 100 100 "Hey there" "hi" %}
# into
# <img src="../images/heythere.jpg" alt="Hey there" class="alignright" title="hi" />
#
# replaces alignleft and alignright classes with appropriate style attribute
# ---
javascript:(function(){var e=false;var t=null;var n=false;var r={javascript:"javascript",js:"javascript",python:"Python",ios:"iOS",youtube:"video",vimeo:"video",video:"video",html:"HTML",css:"CSS",animation:"Animation",animate:"Animation",seo:"SEO",svg:"Vector",icon:"Icons",icons:"Icons",sass:"SASS",html5:"HTML5",grunt:"GruntJS",jquery:"jQuery"};var o={"github.com":".entry-title .js-current-repository"};var i={"www.kickstarter.com":".short-blurb"};var a=function(e){return e.toLowerCase()};var c=function(e){return e?e.textContent.trim().replace(/\s+/g," "):null};var u=a(document.title);var l=function(e){if(e){return u.indexOf(a(e))!=-1}else{return false}};var s=function(e,t,n){n=n||window;var r=e.length;var o;for(var i=0;i<r;++i){o=t.call(n,e.item(i));if(o!==null){return o}}return null};var f=function(){var e=location.href;var t=location.hostname;var n;if(t in o){n=document.querySelector(o[t]);if(n){return c(n)}}var r=document.title;n=document.querySelector("meta[property='og:title']");if(n){r=n.content.trim()

Keybase proof

I hereby claim:

  • I am warthurton on github.
  • I am warthurton (https://keybase.io/warthurton) on keybase.
  • I have a public key whose fingerprint is 0F35 F2F2 5C98 E9E9 D515 EC3F 605F BC68 E81F 6532

To claim this, I am signing this object:

Code to make a markdown version of the twitter embed code. See result picture from DayOne at http://note.io/1iXW8Xl

on alfred_script(q)
tell application "System Events"
set numChrome to count (every process whose name is "Google Chrome")
if numChrome > 0 then
tell process "Google Chrome"
click menu item "pbrl" of menu "Bookmarks" of menu bar 1
end tell
end if
end tell