Skip to content

Instantly share code, notes, and snippets.

View JJ's full-sized avatar
🏠
Working from home

Juan Julián Merelo Guervós JJ

🏠
Working from home
View GitHub Profile
@josecolella
josecolella / forum.py
Last active August 29, 2015 13:57
Forum Challenge TeamTreehouse
#!/usr/bin/env python3
# Author: Jose Miguel Colella
import urllib.request as http
import os.path
import re
import pprint
# The url of the essay
essayUrl = 'http://treehouse-forum-contests.s3.amazonaws.com/visualizing-information/part-one/essays-first-series.txt'
@oskyar
oskyar / deleteLineCsv.pl
Last active August 29, 2015 13:58
Elimina columnas o filas de un archivo .csv
#!/usr/bin/perl
# CopyRight 2014 Óscar Zafra (oskyar@gmail.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@treffynnon
treffynnon / server.js
Created October 21, 2011 13:53
Connect to an IrisCouch database from Node.js, save a new document and retrieve it back again.
var http = require('http');
http.createServer(function (req, http_res) {
http_res.writeHead(200, {'Content-Type': 'text/plain'});
var response = '';
var cradle = require('cradle');
var connection = new(cradle.Connection)('https://subdomain.iriscouch.com', 443, {
auth: { username: 'username', password: 'password' }
});
› git show i-herd-u-liek-chef:foo
bar
› git show i-herd-u-liek-chef~1:foo
fatal: Path 'foo' exists on disk, but not in 'i-herd-u-liek-chef~1'.
@terceranexus6
terceranexus6 / hwriter
Created October 26, 2015 10:22
haiku writer for your dash. Just because you sometimes are inspired, and happen to be in the terminal.
#!/bin/bash
#by @terceranexus6
#this is a haiku writer
read -p"write firt line: " LINEA1
read -p"write second line: " LINEA2
read -p"write third line: " LINEA3
read -p"name of the haiku (add .txt): " NOMBRE
touch $NOMBRE
@size = (1920, 1080);
@center = (-.743653135, .131826563);
$zoom = .000014628;
$max_it = 700;
$oversample = 2;
$_ *= $oversample for (@size);
open $fh, "|-", "convert -size ".join("x",@size)." -depth 8 gray:- ".
"-resize ".(100/$oversample)."% mandel.png";
for $py (1 .. $size[1]) {

PLAYING CARDS


Here we have the code of the program. <((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).roll>

<((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).pick(52)>

<roll> is used for picking any card randomly.

@ElenaMerelo
ElenaMerelo / cards.md
Last active January 8, 2017 11:57
Deck of cards which can be shuffled

#Deck of cards First we pick a random card, then in the second line we shuffle the whole deck of cards, including the one chosen

((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ <♥,♦,♣,♠>).roll

((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ &lt;♥,♦,♣,♠&gt;).pick(52)
@MattOates
MattOates / BioREPL
Last active January 12, 2017 13:22
New Rakudo REPL with slanged multiline quote constructor for arrays of bio-sequence objects. Example takes copy pasted FASTA formatted sequence data between ` ` and creates an array of sequence objects. Translated into amino acids we get the PERL peptide ;3 For the code that generates the slang please see https://github.com/MattOates/BioInfo/blo…
$ perl6 -MBioInfo
To exit type 'exit' or '^D'
> my @dna = `
* >id comment
* CCCGAACGGCTT
* `;
[>id comment
CCCGAACGGCTT
]
> @dna[0].translate
@AlexDaniel
AlexDaniel / save-me-from-texas.creole
Last active March 14, 2017 01:01
Save me from Texas

⚠⚠⚠⚠⚠⚠⚠ ↓↓↓ PAGE MOVED ↓↓↓ ⚠⚠⚠⚠⚠⚠⚠

I moved this page to rakudo wiki. A lot of people wanted to add stuff, but gists are not editable. A wiki is a more appropriate place for this kind of stuff. Rakudo wiki is possibly not the best place for it, but for now that will do.

Plus, GitHub gists totally suck when unicode characters are involved. There's also no preview option here. So I'm glad that it is being moved.

⚠⚠⚠⚠⚠⚠⚠ ↑↑↑ PAGE MOVED ↑↑↑ ⚠⚠⚠⚠⚠⚠⚠

Recently Perl 6 got support for various unicode characters (½ ¹ ∞ × ÷, see this link for a full list), but I don't think that we are done. Here is a list of things to think about.