Skip to content

Instantly share code, notes, and snippets.

View cbertelegni's full-sized avatar

Cristian Bertelegni cbertelegni

View GitHub Profile
@cbertelegni
cbertelegni / .htaccess
Created September 14, 2016 20:01
.htacces desallow .py, php, rb...
<FilesMatch "\.(?:inc|php|py|rb|md)$">
Order allow,deny
Deny from all
</FilesMatch>
@cbertelegni
cbertelegni / .gitignore
Last active May 3, 2022 21:40
Script para obtener sexo desde un csv
output_all.csv
*.zip
@cbertelegni
cbertelegni / .block
Last active January 11, 2019 19:07
Carrera Random
license: mit
@cbertelegni
cbertelegni / merge_csv.py
Created May 27, 2016 17:04
Merge csv files join by column with pandas
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
a = pd.read_csv("file1.csv")
b = pd.read_csv("file2.csv")
merged = pd.merge(a, b, how="inner", on="column_name")
merged.to_csv("merge_file1_file2.csv", index=False)
@cbertelegni
cbertelegni / README.md
Last active May 26, 2016 15:08
Params to json javascript: Convert search/hash location url to json - params to json javascript

Params hash or search to json javascript

Convert search/hash location url to json - params to json javascript

URL Example: example.com/some_page.html#bar=some+value&bar2=value+2&bar3%5B%5D=1&bar3%5B%5D=2&bar3%5B%5D=3&bar3%5B%5D=4

/** fn push items on specific object
* _push to _obj
*/
function pushVarsObjs (_push, _obj){
for (var c in _push){
if ( typeof(_push[c]) == "object" ){
// check if is an Array
_obj[c] = _push[c].indexOf ? [] : {};
for (var k in _push[c] ){
_obj[c][k] = _push[c][k];
@cbertelegni
cbertelegni / csv_to_json.py
Created April 13, 2016 18:02
Convert csv file to json PY
import csv
import json
file_name = "file_name.csv"
f = open(file_name, "r")
output = open(file_name.replace(".csv", ".json"),'w')
reader = csv.DictReader(f)
json.dump([r for r in reader], output,indent=4,sort_keys=False)

Media-queries recomendadas

  • mobile-portrait: min:320px - max:479px;
  • mobile-landscape: min:480px - max:599px;
  • small-tablet-portrait: min:600px - max:799px;
  • small-tablet-landscape: min:800px - max:767px;
  • tablet-portrait: min:768px - max:1023px;
  • tablet-landscape: min:1024px;

Append helpers to DocumentCloud