Skip to content

Instantly share code, notes, and snippets.

View jorgeas80's full-sized avatar
🎯
Focusing

Jorge Arévalo jorgeas80

🎯
Focusing
View GitHub Profile
@jorgeas80
jorgeas80 / simple-react-playground.html
Created July 23, 2016 16:09 — forked from voronianski/simple-react-playground.html
Quick React prototyping in browser on the fly with ES2015. Use this as boilerplate for your playground and upload html file on some server. Created as a solution for this challenge - http://blog.vjeux.com/2015/javascript/challenge-best-javascript-setup-for-quick-prototyping.html with the help of https://github.com/voronianski/babel-transform-in-…
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>React Quick Prototyping</title>
</head>
<body>
<div id="root"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js"></script>
@jorgeas80
jorgeas80 / gist:3e077b917ef6dac3a9266e4633a591d8
Created July 11, 2016 01:53 — forked from robertcedwards/gist:fcec06dc0904a438c6a8
onmouseover html5 video play, mouseout pause
<html>
<head>
</head>
<body>
<div style="text-align:center" onmouseover="Play()" onmouseout="Pause()">
<video id="video1" width="480">
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" />
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.ogg" type="video/ogg" />
Your browser does not support HTML5 video.
</video>
@jorgeas80
jorgeas80 / css-selectors.md
Last active July 10, 2016 21:14 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Check w3schools for further information

Element selectors

Element -- selects all h2 elements on the page

h2 {
@jorgeas80
jorgeas80 / http_request.py
Created July 8, 2016 11:03
Make HTTP call using requests library. Get a JSON route from Toledo to Madrid
import json, requests
import pprint
url = 'http://maps.googleapis.com/maps/api/directions/json'
params = dict(
origin='Toledo,Spain',
destination='Madrid,Spain',
sensor='false'
)
@jorgeas80
jorgeas80 / parser.py
Created July 5, 2016 21:07 — forked from JSONOrona/parser.py
Python command line argument example using argparse module
#!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
@jorgeas80
jorgeas80 / SassMeister-input.scss
Created June 8, 2016 15:14
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
div {
<?php
// get the HTTP method, path and body of the request
$method = $_SERVER['REQUEST_METHOD'];
$request = explode('/', trim($_SERVER['PATH_INFO'],'/'));
$input = json_decode(file_get_contents('php://input'),true);
// connect to the mysql database
$link = mysqli_connect('localhost', 'user', 'pass', 'dbname');
mysqli_set_charset($link,'utf8');
@jorgeas80
jorgeas80 / gist:62fa5145f2eb6ab1192f7b4905b4c9e4
Created April 12, 2016 11:09 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: