Skip to content

Instantly share code, notes, and snippets.

View rogeriopvl's full-sized avatar
🏄‍♂️

Rogério Vicente rogeriopvl

🏄‍♂️
View GitHub Profile
@rogeriopvl
rogeriopvl / styled_selects.css
Last active August 29, 2015 14:01
CSS for a simple styled select element
/* this class is to apply to a span that wraps the select element */
.select-style {
border: 1px solid #ddd;
width: auto;
height: 100px;
border-radius: 3px;
overflow: hidden;
background: url("data:image/png;base64,R0lGODlhDwAUAIABAAAAAP///yH5BAEAAAEALAAAAAAPABQAAAIXjI+py+0Po5wH2HsXzmw//lHiSJZmUAAAOw==") no-repeat right #ddd;
}
@rogeriopvl
rogeriopvl / index.js
Created June 23, 2014 16:42
requirebin sketch
var marked = require('marked');
document.body.innerHTML = marked('# This is markdown!');
# checks out the pull request with the given ID into a local branch named PR<ID>
# example: You have a pull request with id 13. Just do:
# checkout-pr 13 && git checkout PR13
function checkout-pr() {
git fetch origin refs/pull/$1/head:PR$1
}
$params = is_array($urls) ? 'url='.implode('&url=', array_map('urlencode', $urls)) : 'url='.urlencode($urls);
<?xml version="1.0" encoding="UTF-8"?>
<response>
<plaintext>hello world<plaintext>
<hash>5eb63bbbe01eeed093cb22bb8f5acdc3<hash>
<algo>md5<algo>
<status>ok</status>
<error_message></error_message>
</response>
{
"plaintext": "hello world",
"hash": "5eb63bbbe01eeed093cb22bb8f5acdc3",
"algo": "md5",
"status": "ok",
"error_message": ""
}
var sys = require('sys'),
http = require('http');
http.createServer(function(req, res) {
res.sendHeader(200, {'Content-Type': 'text/html'});
res.sendBody('<h1>Hello World</h1>');
res.finish();
}).listen(8080);
sys.puts('Server running at http://127.0.0.1:8080/');
require 'rubygems'
require 'tinyscrobbler'
begin
ls = Tinyscrobbler::Client.new(username, password)
rescue Exception => e
puts 'Error: unable to start last fm scrobbler.'
end
track_list = [
destination: ./_site
auto: false
lsi: false
server_port: 4000
pygments: true
markdown: maruku
permalink: /archives/:title
maruku:
use_tex: false
use_divs: false
<?php
// pseudo-code
if (login == failed) {
$data = "LOGIN FAILED!!! - ";
}
else {
$data = "Login OK! - ";
}