Skip to content

Instantly share code, notes, and snippets.

View tiberiuichim's full-sized avatar
🎯
Focusing

Tiberiu Ichim tiberiuichim

🎯
Focusing
View GitHub Profile
$TTL 1H
plone.ro. IN SOA bns.life.org.ro. hostmaster.plone.ro (
2013050301 ; serial
1h ; refresh
15m ; retry
30d ; expire
1h ) ; negative caching
; NAMESERVER
plone.ro. IN NS bns.life.org.ro. ; nameserver
set-option -g default-shell /usr/bin/fish
set -g default-terminal "tmux"
set -sg escape-time 10
set -ga terminal-overrides ",xterm-256color:Tc,screen-256color:Tc"
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
unbind C-b
set -g prefix M-'\'
from datetime import datetime
from kinto.core import Service
import requests
def fb_authenticate(user_id, access_token):
url = "https://graph.facebook.com/v2.8/me"
data = {
'fields': 'id,name',
'access_token': access_token
function main() {
var db = new Kinto();
// first collection
var tasks = db.collection("tasks");
tasks.events.on('change', function(event) {
console.log('changed in tasks');
})
// second collection

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@tiberiuichim
tiberiuichim / kintoapi.py
Last active April 5, 2017 20:27
Simplistic Kinto Storage API to be used in event-based extensions
from kinto.authorization import RouteFactory
from kinto.core.errors import raise_invalid
from kinto.core.events import ACTIONS
from kinto.core.utils import build_request
from kinto.core.utils import view_lookup
from kinto.views.records import Record
from kinto.views.buckets import Bucket
from kinto.views.collections import Collection
from kinto.views.groups import Group
@tiberiuichim
tiberiuichim / preprocess.clj
Created June 23, 2017 14:35 — forked from jirkamarsik/preprocess.clj
Normalizing Stanford constituency trees as part of my "Applications of NLP" project.
(ns grook.preprocess
(:refer-clojure :exclude [==])
(:use clojure.core.logic
[clojure.pprint :only [pprint]])
(:require [clojure.walk :as walk]
[clojure.java.io :as io]))
;; Running this cleans any previously defined rules from the namespace.
(dorun (for [[sym var] (ns-interns *ns*)
:when (::rule (meta var))]
@tiberiuichim
tiberiuichim / visualizing_topic_models.py
Created July 1, 2017 20:10 — forked from tokestermw/visualizing_topic_models.py
visualization topic models in four different ways
import json
import urlparse
from itertools import chain
flatten = chain.from_iterable
from nltk import word_tokenize
from gensim.corpora import Dictionary
from gensim.models.ldamodel import LdaModel
from gensim.models.tfidfmodel import TfidfModel
def get_job_finish_status(phash_id, timeout=100):
""" Wait for the job to finish or abort if job is unable to finish
Job status can be one of:
- QUEUED
- STARTED
- DEFERRED
- FINISHED
- FAILED
If the job fails to move from queued, deferred to other states, we will
timeout (return False) after the given timeout period.
#!/usr/bin/env python2
""" experimentation with surf.rdflib API """
from __future__ import print_function
import logging
import pprint
from datetime import datetime