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
#deletes all branches that have been merged into master (except your current branch) (substitute "master" for whatever branch you want to clean against) | |
git branch --merged master | grep -v "\*" | xargs -n 1 git branch -d | |
#you can leave off the last command to just list them |
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
if (3 != 3) | |
{ | |
fail("equality check failed on 3"); | |
} | |
/* | |
* That's fine, except that we're usually comparing dynamic data retrieved from the app. | |
* Sometimes we aren't even comparing against static data | |
*/ | |
for (String result : results) | |
{ |
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/env fish | |
# Usage: | |
# run with no args to toggle between on and off | |
# pass a single arg "on" or "off" to do exactly what you'd expect | |
# drop it in ~/bin with a nice name (I have ~/bin/tp) or bind it to a hotkey or something like that | |
function turn-on | |
echo "turning on" | |
synclient touchpadoff=0 |
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
(defun beginning-of-line-or-indentation () | |
"Move to beginning of line, or indentation." | |
(interactive) | |
(let ((start (point))) | |
(back-to-indentation) | |
;; now if point is the same as when we started, we're already at indent start | |
(if (= start (point)) | |
(beginning-of-line)))) | |
(global-set-key (kbd "C-a") 'beginning-of-line-or-indentation) |
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/env fish | |
set -l current_sinks (pactl list short sinks | grep -i "running" | awk "{ print \$1 }") | |
for sink in $current_sinks | |
switch $argv[1] | |
case mute unmute | |
echo "toggling mute" | |
pactl set-sink-mute $sink toggle | |
case up |
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
<project name="MyProject" default="dist" basedir="."> | |
<description> | |
simple example build file | |
</description> | |
<!-- set global properties for this build --> | |
<property name="src" location="src"/> | |
<property name="build" location="build"/> | |
<property name="dist" location="dist"/> | |
<target name="init"> |
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/sbcl --script | |
;;; Documentation: | |
;;; Commentary: | |
;;; Code: | |
(defun timer-tick () | |
"Waits for 1 second" |
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
public class TestTestDeps | |
{ | |
@Test(alwaysRun = true) | |
public void testZ() | |
{ | |
System.out.println("z is running"); | |
assertEquals(1, 1); | |
} | |
@Test(dependsOnMethods = "testZ") |
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
(in-package :cl-user) | |
(defpackage :hello-world-system | |
(:use :asdf)) | |
(in-package :hello-world-system) | |
(defsystem "hello-world" | |
:version "0.1.0" | |
:author "Jason" | |
:license "LLGPL" | |
:description "Say hi." |
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/env perl | |
use strict; | |
my $default = 3; | |
my $lines = @ARGV[0] || $default; | |
$lines = 3 if $lines < 0; | |
for( my $i = $lines; $i > 0; $i-- ) { | |
if ( $i == ($lines / 2) || | |
$i == (($lines + 1) / 2) ) { |
OlderNewer