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
# -*- coding: utf-8 -*- | |
import sys | |
import time | |
from commands import getoutput | |
from arduino import Arduino | |
out = getoutput("ls /dev/ | grep -i ttyUSB").split() | |
try: | |
out[0] |
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
class MiClase: | |
a = 0 | |
b = 13 | |
def asd (b): | |
b = b | |
self.a = b | |
return self.a + " y " + self.b | |
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
# -*- coding: utf-8 -*- | |
import sys | |
import time | |
from commands import getoutput | |
from arduino import Arduino | |
# definir dispositivo | |
out = getoutput("ls /dev/ | grep -i ttyUSB").split() |
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
var HexConverter = { | |
hexDigits : '0123456789ABCDEF', | |
dec2hex : function( dec ) | |
{ | |
return( this.hexDigits[ dec >> 4 ] + this.hexDigits[ dec & 15 ] ); | |
}, | |
hex2dec : function( hex ) | |
{ |
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
var MIN_CHROME_VER = 24; | |
if(parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2]) >= MIN_CHROME_VER){ | |
// el loco sabe y usa chrome! | |
$('#alert').hide(); | |
} |
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
class Vehicle | |
attr_accessor :name, :wheels | |
end | |
class Car < Vehicle | |
def initialize(name) | |
self.name = name | |
self.wheels = 4 | |
end | |
end |
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
5.times do |i| | |
puts i | |
break if i == 3 | |
end |
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 | |
GW=`/sbin/ip route list | grep default | awk '{print $3}'` | |
if ping -c 2 $GW | grep -o Unreachable; then | |
echo down; | |
echo `date`": reconnected to wlan" >> /var/log/wlan0-detail | |
ifdown wlan0 | |
sleep 5 | |
ifup wlan0 | |
fi |
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
class Map | |
constructor: (map) -> | |
mapOptions = | |
center: new google.maps.LatLng(-29.71371, -57.08556), | |
zoom: 16, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
@map = new google.maps.Map map.get(0), mapOptions | |
@markers = [] |
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
### Keybase proof | |
I hereby claim: | |
* I am fermuch on github. | |
* I am fermuch (https://keybase.io/fermuch) on keybase. | |
* I have a public key whose fingerprint is 3A5D 3951 A805 FCCF 6F14 45E3 1510 F5D5 A139 603D | |
To claim this, I am signing this object: |
OlderNewer