Skip to content

Instantly share code, notes, and snippets.

@sulram
sulram / imageloader.as
Created August 18, 2011 13:54
AS3 image loader
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressStatus);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderReady);
var fileRequest:URLRequest = new URLRequest("myImage.jpg");
myLoader.load(fileRequest);
public function onProgressStatus(e:ProgressEvent) {
// this is where progress will be monitored
@sulram
sulram / EDGE Livros.md
Created December 12, 2012 13:37
Encontros Digitais

FILE SYSTEM

size of directories

du -sh webapps/*

remove invisible files

find ./ -name ".svn" | xargs rm -Rf
find ./ -name ".DS_Store" | xargs rm -Rf

GIT UTIL

change remote url

git remote set-url origin git@github.com:sulram/marlus.com.git

http://docs.webfaction.com/software/general.html#granting-access-to-specific-users

permits locate, but deny apps

setfacl -m u:nano:--x $HOME
setfacl -m u:nano:--- $HOME/webapps/*

The above command only affects applications that are currently installed. If you create new applications, you will need to run that command again, or secure the application individually with

setfacl -m u:secondary_username:--- $HOME/webapps/name_of_new_app.

@sulram
sulram / gist:6332146
Last active December 21, 2015 16:18
illustrator CS6 java 6 in moutain lion [solved]

illustrator CS6 java 6 in moutain lion [solved]

Illustrator asks for Java 6, but can't install

You need to reinstall Safari Java 6 plugin as explained in this link: http://support.apple.com/kb/HT5559

Then re-open Illustrator. Install now will suceed

todos os processos

ps aux | less

processos Osc

ps aux | grep Osc*

ver PID de uma porta

.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}