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 / 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*/}})()
@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/>";
}
}
#!/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'
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
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;
@luisinder
luisinder / FastToastAndroid
Created March 11, 2015 09:49
Fast Toast in Android
Toast.makeText(getApplicationContext(),"Toast Text",Toast.LENGTH_LONG).show();
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
@luisinder
luisinder / cloneallbranches
Created April 9, 2015 07:43
Git - clone all remote branches locally
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
package com.example.testSingleton;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
public class ActivityA extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
@luisinder
luisinder / chuleta.txt
Created August 12, 2015 21:50
Pasos para instalar las Guest Additions en Ubuntu
# su (pwd)
# apt-get update
# apt-get upgrade
# apt-get install build-essential
# apt-get install linux-headers-$(uname -r)
# apt-get install module-assistant
# module-assistant prepare