This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define the state machine | |
const stateMachine = Machine({ | |
id: 'projectIdeasOnBenevityStateMachine', | |
initial: 'new', | |
states: { | |
new: { | |
on: { | |
CENSORED: 'censored', | |
DRAFT: 'draft', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'submission-state-machine', | |
initial: 'draft', | |
context: {}, | |
states: { | |
draft: { | |
on: { | |
SUBMIT: { target: 'preModeration' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'submission-state-machine', | |
initial: 'draft', | |
context: {}, | |
states: { | |
draft: { | |
on: { | |
SUBMIT: { target: 'preModeration' }, | |
DELETE: { target: 'deleted' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
import pylast | |
api_key = '189c5354198342a01be847e595afbb14' | |
username = 'eikiu' | |
api = pylast.LastFMNetwork(api_key = api_key) | |
user = pylast.User(username, api) | |
library = user.get_library() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
mkdir temp_gif | |
segs=`expr $1 \* 5` | |
for (( i = 1; i <= $segs ; i++ )); | |
do | |
printf -v number "%06d" $i | |
import -window $WINDOWID temp_gif/$number.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
a = ['A1', 'A2', 'A3', 'A4'] | |
b = ['B1', 'B2', 'B3'] | |
c = ['C1', 'C2'] | |
d = [] | |
for i in a: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://www.google.com/doodles/hurdles-2012 | |
for i in `seq 1 600`; | |
do | |
xdotool search "Mozilla Firefox" windowactivate --sync key Left | |
xdotool search "Mozilla Firefox" windowactivate --sync key Right | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import kinterbasdb | |
import sys | |
""" Establece la base de datos, nombre, sin extension, de /media/db/desa/ """ | |
if len(sys.argv) < 2: | |
print "Debe colocar como parámetro el nombre de la base de datos" | |
sys.exit(1) |
NewerOlder