Skip to content

Instantly share code, notes, and snippets.

{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
# suponha essa função em haskell
add a b = a + b
# currying é fácil
add2 = add 2
add2 4 # 6
# Será que isso é bacana?
add(a, b) = a + b
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
map (negate . round . (* 3)) [2.77, 3.02, 5.05, 2.221]
-- negate . round . (* 3)
-- 1)
-- (* 3) ... em Haskell, todos os operadores são funções (e todas as funções são curryied)
-- x * y == (* x y)
-- logo, (* n) == \x -> (* n x)
-- negate . round . (\x -> 3 * x)
-- 2)
Block -> Element -> Modifier
- Blocks devem ser INDEPENDENTES. Se dependem de um contexto
, devem ser um Element.
- seletores de elemento não devem ser usados (idealmente falando)
- cascading deve ser evitado (normalmente)
$ sudo circusd --log-level debug etc/circus.ini
2014-06-05 11:15:04 circus[8408] [INFO] Starting master on pid 8408
2014-06-05 11:15:04 circus[8408] [DEBUG] Socket bound at 127.0.0.1:8080 - fd: 6
2014-06-05 11:15:04 circus[8408] [INFO] sockets started
2014-06-05 11:15:04 circus[8408] [DEBUG] Initializing watchers
2014-06-05 11:15:04 circus[8408] [DEBUG] cmd: bundle exec thin start -C /home/myuser/myproject/etc/thin.yml -S $(circus.sockets.server)
2014-06-05 11:15:04 circus[8408] [DEBUG] args:
2014-06-05 11:15:04 circus[8408] [DEBUG] process args: ['bundle', 'exec', 'thin', 'start', '-C', '/home/myuser/myproject/etc/thin.yml', '-S', '6']
2014-06-05 11:15:04 circus[8408] [WARNING] error in 'server': [Errno 2] No such file or directory
2014-06-05 11:15:04 circus[8408] [DEBUG] cmd: bundle exec thin start -C /home/myuser/myproject/etc/thin.yml -S $(circus.sockets.server)
$ sudo circusd --log-level debug etc/circus.ini
2014-06-05 13:30:58 circus[9266] [INFO] Starting master on pid 9266
2014-06-05 13:30:58 circus[9266] [ERROR] exception coercing to Unicode: need string or buffer, NoneType found caught
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 227, in wrapper
runner.run()
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 531, in run
yielded = self.gen.send(next)
File "/usr/local/lib/python2.7/dist-packages/circus/arbiter.py", line 510, in start
self.initialize()
File "/usr/local/lib/python2.7/dist-packages/circus/util.py", line 461, in _log
#! /bin/bash
set -e
args=(
$HOME
--exclude-caches
# EDITE A LINHA ABAIXO PRA APONTAR PRA PASTA ONDE
# O SEU REPOSITÓRIO ATTIC ESTÁ. OBVIAMENTE O ATTIC NÃO
# DEVE FAZER BACKUP DE SI PRÓPRIO :)
import asyncio
import sys
from asyncio import Queue
TAG_ALIGN_LEFT = '%{l}'
TAG_ALIGN_CENTER = '%{c}'
TAG_ALIGN_RIGHT = '%{r}'
UNDERLINE_OPEN = '%{+u}'
UNDERLINE_CLOSE = '%{-u}'
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
##
## Check this url for the original reference:
## https://github.com/12foo/dotfiles/blob/master/tag-x11/config/herbstluftwm/topbar.py
## https://github.com/krypt-n/bar
##
##