This file contains hidden or 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 | |
# | |
# source: https://groups.google.com/d/msg/prey-security/vBv3BGI8Qeg/5xIy0LZjzXAJ | |
# | |
# Mount the recovery partition | |
/usr/bin/sudo /usr/sbin/diskutil mount Recovery\ HD | |
# | |
# Backup the recovery boot image | |
/usr/bin/sudo /bin/cp /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg ~/Desktop/ | |
# |
This file contains hidden or 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
property blueutilPath : "/usr/local/bin/blueutil power" | |
if execBlueutil("") ends with "0" then | |
-- Toggle BT on | |
execBlueutil("1") | |
set btStatus to true | |
else | |
-- Toggle BT off | |
execBlueutil("0") | |
set btStatus to false |
This file contains hidden or 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
property blueutilPath : "/usr/local/bin/blueutil power" | |
if execBlueutil("") ends with "0" then | |
-- Toggle BT on | |
execBlueutil("1") | |
set btStatus to true | |
else | |
-- Toggle BT off | |
execBlueutil("0") | |
set btStatus to false |
This file contains hidden or 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 Main { | |
public static void main(String[] args) { | |
Student jimmy = new Student(null, null, 0); | |
jimmy.setQuizScore(95, 0); | |
jimmy.setQuizScore(73, 1); | |
jimmy.setQuizScore(100, 2); | |
jimmy.setQuizScore(55, 3); |
This file contains hidden or 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
doMatch(expr,0) | |
/doMatch | |
doMatch(decimal,0) | |
/doMatch | |
doMatch(operator,0) | |
/doMatch | |
doMatch(group,0) | |
/doMatch | |
doMatch(optional(string('-')),0) | |
/doMatch |
This file contains hidden or 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
doMatch(expr,0) | |
/doMatch | |
doMatch(decimal,0) | |
/doMatch | |
doMatch(operator,0) | |
/doMatch | |
doMatch(group,0) | |
/doMatch | |
doMatch(optional(string('-')),0) | |
/doMatch |
This file contains hidden or 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 static org.junit.Assert.*; | |
import java.io.File; | |
import java.io.IOException; | |
import org.junit.Before; | |
import org.junit.Test; | |
import com.google.common.base.CharMatcher; | |
import com.google.common.base.Charsets; |
This file contains hidden or 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
package com.acme.numbers; | |
import java.util.Arrays; | |
/** | |
* | |
* Given a number, find the next higher number which has the exact same set of | |
* digits as the original number. For example: given 38276 return 38627 | |
* | |
* |
This file contains hidden or 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
Delivered-To: [email protected] | |
Received: by 10.58.239.202 with SMTP id vu10csp168751vec; | |
Mon, 15 Apr 2013 06:40:23 -0700 (PDT) | |
X-Received: by 10.49.97.163 with SMTP id eb3mr15491731qeb.45.1366033222553; | |
Mon, 15 Apr 2013 06:40:22 -0700 (PDT) | |
Return-Path: <[email protected]> | |
Received: from smtp1-ext.rs.github.com (smtp1-ext.rs.github.com. [207.97.227.250]) | |
by mx.google.com with ESMTP id ko8si12369721qeb.19.2013.04.15.06.40.22; | |
Mon, 15 Apr 2013 06:40:22 -0700 (PDT) | |
Received-SPF: pass (google.com: domain of [email protected] designates 207.97.227.250 as permitted sender) client-ip=207.97.227.250; |
This file contains hidden or 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 | |
function error_handler() { | |
echo "Error occurred in script at line: ${1}." | |
echo "Line exited with status: ${2}" | |
} | |
trap 'error_handler ${LINENO} $?' ERR | |
set -o errexit # |