Skip to content

Instantly share code, notes, and snippets.

View hankpillow's full-sized avatar

igor hankpillow

  • mrboots
  • brazil, são paulo.
View GitHub Profile
package aze.motion.specials
{
import aze.motion.EazeTween;
import aze.motion.specials.EazeSpecial;
import flash.geom.*
/**
* scrollRect as eaze property
* @author igor almeida ialmeida.com/
* @usage
# add the current file path into the sources paths
$: << __FILE__.gsub( /[^\/]*$/,"")
@hankpillow
hankpillow / Getpath
Created November 16, 2010 18:42
copies to the clipboard the full path of selected files.
on run
tell application "Finder"
set file_list to the selection as list
if length of file_list > 0 then
set full_list to ""
repeat with x in file_list
if length of full_list = 0 then
set full_list to (POSIX path of file (x as text))
else
set full_list to full_list & return & (POSIX path of file (x as text))
#!/bin/bash
if [ "$1" = "?" ]
then
B1="\033[1m";
B2="\033[0m";
echo -e "";
echo -e "${B1}AUTHOR${B2}";
echo -e " Marcelo Miranda Carneiro - mcarneiro@gmail.com";
echo -e "";
@hankpillow
hankpillow / create-htaccess
Created April 1, 2011 19:06
this script creates htaccess files in the same root as when you called this script
#!/bin/bash
user=$1;
if [ "$user" = "" ]
then
echo -n "user name:"
read user
fi
pwd | awk '{root = $1}; END {print "AuthName \"Secure Area\"\nAuthType Basic\nAuthUserFile " root "/.htpasswd\nrequire valid-user" }' > .htaccess
@hankpillow
hankpillow / html centering content
Created April 20, 2011 15:15
i know there is a bunch of css tricks to do this, but this way always worked for me!
<!DOCTYPE html>
<html xml:lang="pt-BR" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="js/swfobject.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css" media="screen">
@hankpillow
hankpillow / regex-url-params
Created June 3, 2011 19:53
matches in a group all parameters and values in a URL
(\w*)=([^#&]+)
@hankpillow
hankpillow / colorst
Last active December 21, 2015 02:29
#!/bin/bash
black="\033[30m"
gray="\033[37m"
light_gray="\033[97m"
dark_gray="\033[30m"
light_dark_gray="\033[90m"
scriptencoding utf-8
if has('vim_starting')
if &compatible
set nocompatible
endif
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
function! StripTrailingWhitespace()
thisYear="2016"
nextYear="$thisYear"
for month in {1..12};
do
nextMonth=$(expr 1 + $month)
if [ "$month" -eq 12 ];
then
nextYear=$(expr 1 + $thisYear)
nextMonth="1"
fi