Skip to content

Instantly share code, notes, and snippets.

Avatar

Cristhian Boujon CristhianBoujon

View GitHub Profile
@maennchen
maennchen / AmazonS3Service.php
Created Dec 17, 2015
A simple Symfony Service to Upload Files to Amazon S3
View AmazonS3Service.php
<?php
namespace Acme\DemoBundle\Services;
use Aws\S3\S3Client;
/**
* Class AmazonS3Service
*
* @package Acme\DemoBundle\Service
*/
@joyofdata
joyofdata / gist:26e49e77285e35bc2439
Created Mar 26, 2015
Setting Up a Time Dimension Table in MySQL / comment
View gist:26e49e77285e35bc2439
DROP TABLE IF EXISTS `T`;
CREATE TABLE `T` (
`n` int(11)
);
INSERT INTO `T`(n) SELECT @row := @row + 1 as row FROM
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t2,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t3,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t4,
@ngcrawford
ngcrawford / multiprocessing_template.py
Created Mar 29, 2012
Template for multiprocessing large files line by line
View multiprocessing_template.py
#!/usr/bin/env python
# encoding: utf-8
import multiprocessing
from textwrap import dedent
from itertools import izip_longest
def process_chunk(d):
"""Replace this with your own function
that processes data one line at a
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: