Skip to content

Instantly share code, notes, and snippets.

View talkahe's full-sized avatar

Jorge Gamarra talkahe

  • Spain
View GitHub Profile
@talkahe
talkahe / index.js
Last active December 19, 2017 23:20
Bluetooth Server
var bluetooth_serial_port = require('bluetooth-serial-port');
var node_ssh = require('node-ssh');
var BLUESERVER = BLUESERVER || {
// Dependencies
bluetooth: new(bluetooth_serial_port).BluetoothSerialPortServer(),
ssh: new node_ssh(),
// Message codes
INITIAL_CONFIG: 0,
@talkahe
talkahe / clientClass.py
Last active December 19, 2017 22:03
Simón en Python con SDL v2
import socket, select, threading, sdl2.ext, sys
from sdl2 import *
from time import sleep
class Client():
def __init__(self):
''' Constructor '''
self.running = True
self.state = "connecting"
@talkahe
talkahe / md-cheatsheet.md
Created December 24, 2016 05:05
A little Markdown cheatsheet

Markdown cheatsheet

This is a paragraph filled with some bold text and some italic text. The two ways of doing this. We can also strike out some text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

this is part of the same line.
New line.

@talkahe
talkahe / atom_packages.sh
Last active August 14, 2018 07:44 — forked from JarLowrey/atom_stater_pack.sh
Basic Atom Packages
#!/bin/sh
#Download, 'cd' into the Downloads/ directory, run 'sh atom_packages.sh' in a terminal
#Editor
apm install linter # https://atom.io/packages/linter - available linters: http://atomlinter.github.io/
apm install highlight-selected # https://atom.io/packages/highlight-selected
apm install atom-beautify # https://atom.io/packages/atom-beautify
apm install fold-lines # https://atom.io/packages/fold-lines
@talkahe
talkahe / getYoutubeVideoID.php
Last active October 26, 2017 20:41
Expresión regular ID video Youtube
<?php
//obetener la id del video de youtube
$url = $_POST["video"];
preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $matches);
$video = $matches[0];
if($video==""){
echo "La URL debe ser un enlace a Youtube.";
die();
}else{
echo "OK.";
@talkahe
talkahe / keybase.md
Created July 14, 2016 18:10
keybase.md

Keybase proof

I hereby claim:

  • I am talkahe on github.
  • I am talkahe (https://keybase.io/talkahe) on keybase.
  • I have a public key ASCD_kvqA1DMgjALB87xqCbmjUeAx-AVH3lQqf1Xg5h9vwo

To claim this, I am signing this object: