Skip to content

Instantly share code, notes, and snippets.

View luisinder's full-sized avatar
:octocat:
Focusing

Luis Cajigas luisinder

:octocat:
Focusing
View GitHub Profile
@luisinder
luisinder / FastToastAndroid
Created March 11, 2015 09:49
Fast Toast in Android
Toast.makeText(getApplicationContext(),"Toast Text",Toast.LENGTH_LONG).show();
import android.animation.LayoutTransition;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
crack Sublime Text (2 and 3)
1. Open Sublime in a HEX editor (the executable file)
2. Find 43 33 33 42 30 32
3. Replace in the string 33 42 with 32 42
4. Save
5. Enter the license below:
—–BEGIN LICENSE—–
Patrick Carey
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@luisinder
luisinder / PHP: Foreach (array of arrays)
Created May 3, 2014 08:37
PHP: Foreach (array of arrays)
foreach($resultArray as $row => $innerArray){
foreach($innerArray as $innerRow => $value){
echo $value . "<br/>";
}
}
@luisinder
luisinder / Show_Form()
Created April 9, 2014 20:01
Bookmark for show all the hidden form-fields
javascript:(function(){var i,f,j,e,div,label,ne; for(i=0;f=document.forms[i];++i)for(j=0;e=f[j];++j)if(e.type=="hidden"){ D=document; function C(t){return D.createElement(t);} function A(a,b){a.appendChild(b);} div=C("div"); label=C("label"); A(div, label); A(label, D.createTextNode(e.name + ": ")); e.parentNode.insertBefore(div, e); e.parentNode.removeChild(e); ne=C("input");/*for ie*/ ne.type="text"; ne.value=e.value; A(label, ne); label.style.MozOpacity=".6"; --j;/*for moz*/}})()