Skip to content

Instantly share code, notes, and snippets.

View gabouh's full-sized avatar
💭
I may be slow to respond.

Gabriel gabouh

💭
I may be slow to respond.
View GitHub Profile
/*
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !!
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@gabouh
gabouh / cat.js
Last active March 23, 2016 19:54
Get Item element text and use it as title in the next page
var scrollView = new scrollViewModule.ScrollView();
var myItems = [
{ name: "Different Item One" },
{ name: "Different Item Two" }
];
var bindingContext;
exports.loaded = function(args) {
@gabouh
gabouh / AndroidManifest.xml
Created March 25, 2016 10:50
NativeScript Splash Screen for Android
File from app/App_Resources/Android/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
@gabouh
gabouh / home-view-model.js
Created March 28, 2016 16:06
SearchBar implementation - Not working
Model.set("searchVisible", false);
Model.searchShow = function() {
this.set("searchVisible", true);
};
Model.searchHide = function() {
this.set("searchVisible", false);
};
// I'm using a definedProperty for a specific reason -- if you don't need a event you can attach to fired per character inserted into the search bar
// Then just doing a Model.set("searchValue", ""); is all you need rather than the code below.
@gabouh
gabouh / rfc.html
Created April 29, 2016 07:27 — forked from rvazquezglez/rfc.html
Calcula RFC (registro federal de causantes) sin homoclave usando jQuery
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
function calculaRFC() {
function quitaArticulos(palabra) {
return palabra.replace("DEL ", "").replace("LAS ", "").replace("DE ",
"").replace("LA ", "").replace("Y ", "").replace("A ", "");
}
function esVocal(letra) {
@gabouh
gabouh / pdftotext.html
Created May 8, 2016 05:21 — forked from hubgit/pdftotext.html
Embedding the PDFToText service in HTML
<!-- edit this; the PDF file must be on the same domain as this page -->
<iframe id="input" src="your-file.pdf"></iframe>
<!-- embed the pdftotext service as an iframe -->
<iframe id="processor" src="http://hubgit.github.com/2011/11/pdftotext/"></iframe>
<!-- a container for the output -->
<div id="output"></div>
<script>
@gabouh
gabouh / buffertowav.js
Created May 8, 2016 07:06 — forked from kevincennis/buffertowav.js
Buffer to WAV
// assuming a var named `buffer` exists and is an AudioBuffer instance
// start a new worker
// we can't use Recorder directly, since it doesn't support what we're trying to do
var worker = new Worker('recorderWorker.js');
// initialize the new worker
worker.postMessage({
command: 'init',
@gabouh
gabouh / lexer.py
Created May 30, 2016 05:30 — forked from tylercrompton/lexer.py
A lexical analyzer for Python
class Token:
def __init__(self, value, type):
self.value = value
self.type = type
def __repr__(self):
return '{}({}, {})'.format(self.__class__.__name__, repr(self.value), repr(self.type))
class PatternError(ValueError):
pass
@gabouh
gabouh / Sublime Text 3 Build 3103 License Key - CRACK
Created June 27, 2016 17:07
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages