Skip to content

Instantly share code, notes, and snippets.

View eric-wood's full-sized avatar
🥑
probably snacking

Eric Wood eric-wood

🥑
probably snacking
View GitHub Profile
var stuff= jQuery('blockquote blockquote'); stuff.hide(); stuff.each(function() { var foo = jQuery(this); jQuery('<div class="quote-expand">expand</div>').prependTo(foo.parent()); }); jQuery('.quote-expand').click(function() { var stuffs = jQuery(event.target).parent().find('blockquote'); jQuery(stuffs[0]).is(':visible') ? stuffs.slideUp() : stuffs.slideDown() });
@eric-wood
eric-wood / wtf.xml
Created November 22, 2013 17:39
This is what happens when you copy one line of text in MS Word
<p><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif; line-height: 1.33333em;">wtf</span><br></p>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Revision>0</o:Revision>
#!/usr/local/bin/zsh
# my awesome grep alias
function ff () {
grep "$@" -s -n -I -R . --color=always --exclude=\*.{data,swp,db,log,git,noun,adj,verb} | grep -v -E 'ckeditor';
}
cd ~/community/app
for branch in $(git for-each-ref --format='%(refname)' refs/heads/ | grep msp); do
git checkout $branch > /dev/null
@eric-wood
eric-wood / gist:5647448
Created May 25, 2013 00:45
Move shit around or whatever
-- wow I hate applescript
tell application "System Events"
-- get screen bounds
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
-- get bounds of window
@eric-wood
eric-wood / index.html
Created April 1, 2013 20:23
A CodePen by Eric. Progress Bar - Experimentation with a new widget for the Spiceworks ui-toolkit.
<div class="pb-container">
<div class="progress-bar" data-size="large" data-number="true" data-animation="true" data-percentage="50"></div>
</div>
<div class="pb-container">
<div class="progress-bar" data-size="medium" data-number="true" data-animation="true" data-percentage="60"></div>
</div>
<div class="pb-container">
<div class="progress-bar" data-size="small" data-number="true" data-animation="true" data-percentage="70"></div>
@eric-wood
eric-wood / index.html
Created March 28, 2013 15:06
A CodePen by Eric. Progress Bar - THIS SHOWS PROGRESSSSS
<div class="progress-bar">
</div>
<label for="progress">Progress</label>
<input type="text" id="progress" name="progress" value="50">
<button id="update">Update</button>
final class GraffitiCom {
private static GraffitiClient singleton = null;
private GraffitiCom() {
}
public static void setHost(String hostname, boolean devserver) throws MalformedURLException {
singleton = new GraffitiClient(new URL(hostname), devserver);
}
@eric-wood
eric-wood / Stack trace
Created November 30, 2012 21:21
Sketch upload error
11-30 21:19:51.034: E/AndroidRuntime(1538): FATAL EXCEPTION: AsyncTask #2
11-30 21:19:51.034: E/AndroidRuntime(1538): java.lang.RuntimeException: An error occured while executing doInBackground()
11-30 21:19:51.034: E/AndroidRuntime(1538): at android.os.AsyncTask$3.done(AsyncTask.java:200)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
11-30 21:19:51.034: E/AndroidRuntime(1538): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
11-30 21:19:51.034
final class GraffitiCom {
private static GraffitiClient singleton = null;
private GraffitiCom() {
}
public static void setHost(String hostname, boolean devserver) throws MalformedURLException {
singleton = new GraffitiClient(new URL(hostname), devserver);
}