Skip to content

Instantly share code, notes, and snippets.

Avatar

Jul Ceballos mrjceb

  • Conekta Inc.
  • Mexico City
View GitHub Profile
View demo.json
{
"shipment": {
"id": "12345",
"carrier_rate": 1000,
"shipper_price": 900,
"origin": "Monterrey, NL",
"destination": "Cuauhtémoc, CDMX",
"pickup_datetime": "2019-10-29 22:00:00-05:00",
"delivery_datetime": "2019-10-13 13:00:00-05:00",
"shipment_type": 1
View Get anima music content
function sleep(milliseconds) {
var start = new Date().getTime()
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds) {
break
}
}
}
for(var i = 0; i < $('.mdtc-clnplra-playlist-item').length; i++) {
View gist:b7745e00985456a2e8ba15d60d19a33f

1. SQL

CREATE DATABASE family;
USE family;
CREATE TABLE rels (padre INT, hijo INT);
INSERT INTO rels (padre, hijo) VALUES (20, 18);
INSERT INTO rels (padre, hijo) VALUES (12, 6);
INSERT INTO rels (padre, hijo) VALUES (18, 4);
INSERT INTO rels (padre, hijo) VALUES (34, 20);
View bitbucket policy
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@mrjceb
mrjceb / css3ResizeEffect.css
Created Mar 19, 2012
Input resize animation with css3
View css3ResizeEffect.css
input{
width:300px;
-moz-transition-duration:1s;
-webkit-transition-duration:1s;
-o-transition-duration:1s;
transitition-duration:1s;
}
input:hover{
width:500px;
}
View gist:498682
#!/usr/bin/env python
REQUIRES_MAIN_JS ='''var %(module)s = require('%(module)s');
'''
MAIN_JS = '''
exports.main = function(options, callbacks){
console.log('Jetpack addon running');
/*Your code is here below*/
View josab.py
import os, sys
from pyExcelerator import *
os.system('ls -R * > lista.txt')
lista=open('lista.txt','r')
path=''
cad=''
cadena=''
cont_row=0
libro=Workbook()
hoja=libro.add_sheet('data')
View mkpkg
def makepackage(env_root, args):
pack_path=os.path.abspath(os.path.dirname('__file__'))
from templates import DEFAULT_README_DOC, MAIN_JS, MAIN_JS_DOC, MODULE_JS, PACKAGE_TEMPLATE, REQUIRES_MAIN_JS
if len(args)%2 == 0:
try:
requires = ''
for d in ['','lib','data','tests','docs']:
os.mkdir(os.path.join(pack_path,args[1],d))
file = open(os.path.join(pack_path,args[1],'README.md'),'w')
file.write(DEFAULT_README_DOC % {'packName':args[1]})
View goto.js
CmdUtils.CreateCommand({
names: ["goto"],
icon: "http://www.mozilla.org/favicon.ico",
description: "Command to go to a website.",
help: "Just write goto and your url.",
author: {name: "Julian Ceballos", email: "julianceballos@mozilla-mexico.org"},
license: "GPL",
homepage: "http://mozilla-mexico.org",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
@mrjceb
mrjceb / mozmx.js
Created Jun 15, 2010
Ubiquity command to browse on Mozilla México website
View mozmx.js
CmdUtils.CreateCommand({
names: ["mozmx"],
icon: "http://www.mozilla-mexico.org/favicon.ico",
description: "Comando para navegar en el sitio de mozilla México",
help: "Escribe mozmx y alguna de las opciones: wiki,forums,groups,chat,blog",
author: {name: "Julian Ceballos", email: "julianceballos@mozilla-mexico.org"},
license: "GPL",
homepage: "http://www.mozilla-mexico.org",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {