Skip to content

Instantly share code, notes, and snippets.

View Agnostic's full-sized avatar

Gilberto Avalos Agnostic

View GitHub Profile
@Agnostic
Agnostic / rfc_curp.js
Created October 4, 2013 13:20
Calcular RFC y CURP
/*
Modificación de script desarrollado por mirrorlinux.net
*/
function calculaRFCURP(data) {
var paterno1st = data.apellido_paterno.toUpperCase();
paterno1st = paterno1st.replace("LAS","");
paterno1st = paterno1st.replace("DEL","");
var paterno = paterno1st.replace("LA","");
paterno = paterno.replace("DE","");
@Agnostic
Agnostic / git-pull-yosemite-fix
Last active May 8, 2018 11:43
/git-core/git-pull: line 11: git-sh-setup: No such file or directory (git pull Yosemite FIX)
// Open:
/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-pull
// Replace line 11 & 12
. git-sh-setup
. git-sh-i18n
// With this:
. /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-sh-setup
. /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-sh-i18n
@Agnostic
Agnostic / gist:826bf7985ebaebeebf5d5f51d7c94110
Created June 17, 2016 21:12
Interview ID - 57645f3029e1bcc02c000254
f80681c41c43b41fea575b8ae8d8dc8e: {locked_at : 2016-06-17 21:08:15 UTC}
f80681c41c43b41fea575b8ae8d8dc8e: {keep_alive_at : 2016-06-17 21:08:15 UTC}
f80681c41c43b41fea575b8ae8d8dc8e: {last_error : }
f80681c41c43b41fea575b8ae8d8dc8e: {active_at : }
f80681c41c43b41fea575b8ae8d8dc8e: {created_at : 2016-06-17 21:08:15 UTC}
f80681c41c43b41fea575b8ae8d8dc8e: {job : {"params"=>{"user_id"=>"56c37cf4f7bb36d06a000071", "organization_id"=>"56c37b61f7bb36d06a00003a", "event"=>"schedule_live_interview", "timestamp"=>1466197695}, "class"=>"Jobs::Intercom::CreateEventJob"}}
f80681c41c43b41fea575b8ae8d8dc8e: {queue_options : {}}
f80681c41c43b41fea575b8ae8d8dc8e: SUCCESS: Created event schedule_live_interview for organization 56c37b61f7bb36d06a00003a successfuly
f80681c41c43b41fea575b8ae8d8dc8e: Completed job 576466bf29e1bc39da00000c
f80681c41c43b41fea575b8ae8d8dc8e: Harakiri
@Agnostic
Agnostic / list.html
Last active December 21, 2015 00:58
Custom filter for ngRepeat using objects (AngularJS)
<div ng-controller='listController'>
<input type='text' ng-model='filterInput'>
<ul>
<li ng-repeat='item in items | filter:customFilter'>
{{ item.name }}
</li>
</ul>
</div>
@Agnostic
Agnostic / bouncingBall.js
Created June 5, 2013 15:07
Simple bouncing ball with jQuery.
// Create element
var _ball = document.createElement('div');
_ball.className = 'ball';
// CSS
$(_ball).css({
width: '40px',
height: '40px',
borderRadius: '50%',
position: 'fixed',
@Agnostic
Agnostic / is-balanced.js
Created June 29, 2015 23:33
Is a string balanced? [Javascript]
function isBalanced(string) {
var balanced = true;
var parts = string.split('');
var openBraces = /{|\[|\(/;
var closeBraces = /}|\]|\)/;
var stack = [];
for (var i = 0; i < parts.length; i++) {
if (parts[i].match(openBraces)) {
stack.push(parts[i]);
@Agnostic
Agnostic / gist:88c599b046770b641b06
Created November 4, 2014 19:32
.jshintrc sublime
{
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
// Documentation: http://www.jshint.com/docs/options/
"browser": true,
"esnext": true,
"globals": {
"$": true,
"_": true,
"angular": true,
@Agnostic
Agnostic / c_major_bass.scm
Last active August 29, 2015 14:05
C Major + Bass with Impromptu
; C Major Chord
; By Gilberto Avalos
; You need Impromptu to run this script
; http://impromptu.moso.com.au/downloads.html
; Clear all
(au:clear-graph)
; Define piano instrument
@Agnostic
Agnostic / c_major_Impromptu.csm
Last active August 29, 2015 14:05
C Major Chord in Impromptu
; C Major Chord
; By Gilberto Avalos
; Clear all
(au:clear-graph)
; Define piano instrument
(define piano (au:make-node "aumu" "dls " "appl"))
(au:connect-node piano 0 *au:output-node* 0)
(au:update-graph)
@Agnostic
Agnostic / build_ios.sh
Last active August 29, 2015 13:59
Build distribution iOS (Titanium CLI)
titanium build -p ios -F ipad -R ~/ALL_PURPOSE.mobileprovision -T dist-appstore