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://stackoverflow.com/questions/307503/whats-the-best-way-to-check-that-environment-variables-are-set-in-unix-shellscr | |
[ -z "$LINGUA" ] && echo "Need to set LINGUA" && exit 1; | |
[ -z "$MANUAL" ] && echo "Need to set MANUAL" && exit 1; | |
git add -u . | |
commit_msg=`tempfile` | |
echo "($LINGUA) Use latest reviewed $MANUAL manual translation" > $commit_msg | |
echo >> $commit_msg |
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 | |
# http://tuxradar.com/content/xdotool-script-your-mouse | |
xdotool mousemove 2470 220 | |
xdotool click 1 | |
sleep 30 | |
xdotool mousemove 2555 427 | |
xdotool click 1 | |
sleep 2 |
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 | |
url="$1" | |
# http://stackoverflow.com/questions/11711339/getting-webpage-title-img-metadata-info-from-linux-terminal | |
title=$(wget $url -O - | grep \<title\>|sed "s/\<title\>\([^<]*\).*/\1/" | tr ' ' '_') | |
links -dump $url >> "$title".txt |
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://stackoverflow.com/questions/307503/whats-the-best-way-to-check-that-environment-variables-are-set-in-unix-shellscr | |
[ -z "$DEB_VER" ] && echo "Need to set DEB_VER" && exit 1; | |
# Modified info from[0]. | |
# install deps to build kernel; apt-get install curl kernel-package fakeroot | |
# install menu dependency; apt-get install libncurses5-dev | |
# build configuration; make menuconfig |
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/bash | |
src="$1" | |
dst="$2" | |
f=/tmp/$dst.md | |
echo "\`\`\`" > $f | |
echo "Hei," >> $f | |
echo "vedlagt er $app_name versjon $dst. Følgende nevneverdige endring har blitt gjort:" >> $f | |
echo >> $f | |
for r in `git rev-list $src..$dst`; | |
do |
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
exec chromium-browser "? $(xclip -o)" |
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
import Cocoa | |
import XCPlayground | |
@IBDesignable | |
class SparkGraph: NSView { | |
// Background Colour | |
@IBInspectable var backgroundColor:NSColor? | |
// Border |
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
print("😀") |
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
class Named { | |
let name: String | |
init(name: String) { | |
self.name = name | |
} | |
} | |
let cat = Named(name: "cat") | |
let dog = Named(name: "dog") |
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
import Foundation | |
func cmd(launchPath: String, args: [String]?) -> NSString? { | |
let task = NSTask() | |
task.launchPath = launchPath | |
if let arguments = args { | |
task.arguments = arguments | |
} | |