Skip to content

Instantly share code, notes, and snippets.

View cuibonobo's full-sized avatar

Jen Garcia cuibonobo

View GitHub Profile
@cuibonobo
cuibonobo / notepad.html
Created July 21, 2013 01:09 — forked from jdkanani/notepad.html
Everything after `data:text/html,` needs to be URL encoded (http://meyerweb.com/eric/tools/dencoder/) so that it can work in most browsers.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
var imageAddr = "http://www.tranquilmusic.ca/images/cats/Cat2.JPG" + "?n=" + Math.random();
var startTime, endTime;
var downloadSize = 5616998;
var download = new Image();
download.onload = function () {
endTime = (new Date()).getTime();
showResults();
}
startTime = (new Date()).getTime();
download.src = imageAddr;
@cuibonobo
cuibonobo / ScaleStrokePalette.js
Created August 19, 2013 22:10
Illustrator script that creates a palette with a slider that allows you to scale the stroke width of the selected object. Written by Carlos Canto and posted in the Illustrator scripting forums. What's remarkable about this file is the streamlining of the BridgeTalk call, which allows the palette to execute functions while staying open.
// script.name = scaleStrokes.jsx;
// script.description = scales selected objects strokes only;
// script.required = one or more selected objects
// script.parent = CarlosCanto // 5/7/12;
// script.elegant = false;
// script.updates = preview ON by default // 5/7/12
#target Illustrator
#targetengine 'main'
var unscale = 0;
#!/bin/bash
# log into your server
ssh root@[server ipaddress]
# change root password
passwd
# update all packages and operating system
apt-get update && apt-get --yes upgrade
#!/bin/sh
# any2pandoc.sh
#
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
#
# https://gist.github.com/1181510
#
# Depends on:
@cuibonobo
cuibonobo / BridgeTalkObject.js
Created September 26, 2013 21:36
Pass a custom object through BridgeTalk. (Taken from http://kasyan.ho.com.ua/bridgetalk_custom_object.html)
#target indesign
var file = new File('~/Desktop/Sample.pdf');
if (!file.exists) { exit(); }
CreateBridgeTalkMessage({
file: file,
cropPage: 'CropToType.MEDIABOX',
resolution: 300,

Bearded's Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.

@cuibonobo
cuibonobo / file-system-changes.markdown
Last active January 2, 2016 14:39
Detecting additions or deletions of files in a directory structure
  1. Save the initial state of the file system in a tree structure
time find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' > state1.txt
  1. After a time, get the current state of the file system
time find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' > state2.txt
@cuibonobo
cuibonobo / sample-data.sh
Created January 12, 2014 03:20
Load sample data into the ISIS API server
curl -d '[{"name":"file.ai","paths":["/path/to/file.ai","/different/path/to/file.ai"],"type":"ai","hash":"e953e128c52dc01c1c554c0d47c1d0932f92a04c","datecreated":"Tue, 22 Oct 2013 20:59:22 GMT","datemodified":"Tue, 22 Oct 2013 20:59:22 GMT","thumbnail":"/path/to/thumbnail.jpg","content":[{"id":"123","value":"This User","description":"author"},{"id":"456","value":"Task #789","description":"task"}],"tags":["tag1","tag2","tag3"]},{"name":"anotherfile.ai","paths":["/path/to/anotherfile.ai","/different/path/to/anotherfile.ai"],"type":"ai","hash":"f953e128cf2dc01c1c55fc0d47c1d0932f92a04c","datecreated":"Mon, 21 Oct 2013 20:59:22 GMT","datemodified":"Mon, 21 Oct 2013 20:59:22 GMT","thumbnail":"/path/to/thumbnail2.jpg","content":[{"id":"123","value":"This User","description":"author"}],"tags":["tag1","tag4","tag5"]},{"name":"this.jpg","paths":["/path/to/this.jpg"],"type":"jpg","hash":"b953e1b8cf2dc01c1cb5fc0d47c1d0932f92a04c"}]' -H 'Content-Type: application/json' http://127.0.0.1:5000/api/0.1/assets
@cuibonobo
cuibonobo / wp-deploy.sh
Created January 15, 2014 05:06
Deploy from a git repo to the WordPress SVN repository.
#! /bin/bash
#
# Script to deploy from Github to WordPress.org Plugin Repository
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# Source: https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh
#prompt for plugin slug
echo -e "Plugin Slug: \c"
read PLUGINSLUG