Skip to content

Instantly share code, notes, and snippets.

@BrandonSmith
BrandonSmith / update_submodules.sh
Created April 28, 2009 19:02
Updates listed git svn submodules. I am sure there is a more generic way to accomplish this, but it works for my needs.
#!/bin/sh
ROOT=/Volumes/git
#SM_ROOT=zero
#SM_SUBMODULES=( CORE/dojo )
AB_ROOT=appbuilder
AB_SUBMODULES=( BUILD/zero.build BUILD/zero.docs BUILD/zero.findbugs.ext BUILD/zero.infocenter.build BUILD/zero.infocenter.feature BUILD/zero.infocenter.updatesite )
SUBMODULES=(${AB_SUBMODULES[@]}) # ${SM_SUBMODULES[@]}
<script type="text/javascript" charset="utf-8">
var is_ssl = ("https:" == document.location.protocol);
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" charset="utf-8">
var feedback_widget_options = {};
feedback_widget_options.display = "overlay";
<extension name="transfer_to_voicemail">
<condition field="destination_number"
expression="^transfer_to_voicemail$">
<action application="sleep" data="1"/>
<action application="set" data="continue_on_fail=true"/>
<action application="read" data="3 5 {{ vm_id_prompt_file }} vmbox_id 30000 #"/>
<action application="set" data="origination_cancel_key=#"/>
<action application="transfer" data="validate_transfer_vbox_id"/>
</condition>
</extension>
@BrandonSmith
BrandonSmith / AndroidManifest.xml
Last active July 19, 2023 19:11
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@BrandonSmith
BrandonSmith / keybase.md
Created September 22, 2014 15:52
Keybase Verification

Keybase proof

I hereby claim:

  • I am brandonsmith on github.
  • I am brandonsmith (https://keybase.io/brandonsmith) on keybase.
  • I have a public key whose fingerprint is 42F0 33EE 3293 9438 48DD 74EF 8BE9 B7D4 6824 BE70

To claim this, I am signing this object:

Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman);
RoundedBitmapDrawable circularBitmapDrawable = //
RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap);
circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth());
myImageView.setImageDrawable(circularBitmapDrawable);
System.out.prinln("MyActivity", "That's all folks");
@BrandonSmith
BrandonSmith / conf.js
Created August 10, 2015 19:26
Google Form Filler
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
specs: ['example-spec.js'],
jasmineNodeOpts: {
@BrandonSmith
BrandonSmith / sms_blaster.sh
Created January 30, 2017 19:05
SMS Blaster
#!/bin/bash
if [ $# -lt 5 ]; then
echo -e "./send_sms.sh <device> <to_number> <big|small> <number_of_texts> [sleep_time]"
exit 0
fi
if [ $5 -ge 500 ]; then
while true; do
read -p "Are you sure you want to send >500 texts? y/n`echo $'\n> '`" yn
@BrandonSmith
BrandonSmith / electron-lets-move.js
Created June 6, 2017 14:54
Fork of `electron-lets-move`
import {
app,
dialog,
shell
} from 'electron'
import os from 'os'
import childProcess from 'child_process'
import sudo from 'sudo-prompt'
import path from 'path'