Skip to content

Instantly share code, notes, and snippets.

@hgfischer
hgfischer / ts-shara.txt
Created March 9, 2014 15:36
Esquema No-Break TS-Shara 1.2Kva
2400 8N1
SEND: Q1
REcv: (129.0 129.0 117.0 032 60.0 28.1 @@.@ 00101001
___________ _____ ___ ____ ____ ____ ________
A B C D E F GHIJKLMN
A- Entrada (V)
B- Saída (V)
C- Corrente (0 a 255%)
@hgfischer
hgfischer / django_auth_user.txt
Created March 25, 2011 17:38
Code to hack User model for Django
Put this in models.py of your application, before auth syncdb
# Hack django.contrib.auth.User
User._meta.get_field_by_name('username')[0].max_length = 128
User._meta.get_field_by_name('first_name')[0].max_length = 128
User._meta.get_field_by_name('last_name')[0].max_length = 128
User._meta.get_field_by_name('email')[0].max_length = 128
@hgfischer
hgfischer / gist:1111900
Created July 28, 2011 16:41
ResourceSpace jupload error
00000 12:16:58.047 wjhk.jupload2.gui.JUploadTextArea$LogMessageThread [DEBUG] Logging system is initialized00001 12:16:58.006 wjhk.jupload2.JUploadApplet [INFO] JUpload juploadContext started, with wjhk.jupload2.policies.DefaultUploadPolicy upload policy
00002 12:16:58.007 wjhk.jupload2.JUploadApplet [INFO] Debug level set to 99
00003 12:16:58.007 wjhk.jupload2.JUploadApplet [INFO] Current debug output file: /tmp/jupload_3630591459949100418_log.txt
00004 12:16:58.007 wjhk.jupload2.JUploadApplet [DEBUG] setLang - language read (no country): en
00006 12:16:58.020 HttpProtocolFinderThread [DEBUG] Getting serverProtocol from HEAD request
00005 12:16:58.020 wjhk.jupload2.JUploadApplet [DEBUG] [DefaultUploadPolicy] end of constructor (serverProtocol has been set)
00007 12:16:58.021 wjhk.jupload2.JUploadApplet [DEBUG] uploadPolicy parameter = DefaultUploadPolicy
00008 12:16:58.021 wjhk.jupload2.JUploadApplet [DEBUG] uploadPolicy = wjhk.jupload2.policies.DefaultUploadPolicy
00009 12:16:58.
@hgfischer
hgfischer / keepalived.conf
Created October 17, 2011 21:32
Keepalived Redis
vrrp_instance VI_1 {
interface eth0
state SLAVE
virtual_router_id 55
priority 100
authentication {
auth_type PASS
auth_pass monomonomono
}
virtual_ipaddress {
@hgfischer
hgfischer / notify-redis
Created October 17, 2011 21:33
Keepalived Notify-Redis
#!/bin/bash
MASTER_IP='111.22.33.44'
MASTER_PORT=6379
if [ "$#" -lt "3" ]
then
exit
fi
@hgfischer
hgfischer / vaga_php_public.md
Created March 15, 2012 21:26
Vaga para Desenvolvedor PHP

Caros,

a Zocprint é o mais novo investimento da Rocket Internet no Brasil. Prestamos serviços gráficos de qualidade pela Internet para microempresários e profissionais liberais a um preço baixo, e sem necessidade de confecção da arte pelo cliente.

Estamos com metas muito agressivas de crescimento e precisamos de talentos para suportá-las. Temos algumas vagas de tecnologia para desenvolvedores PHP.

Pré-requisitos:

  • Ser ninja de programação em PHP 5.x
  • Saber o que é e como usar classes, objetos, herança
@hgfischer
hgfischer / vaga_frontend_public.md
Created March 15, 2012 21:26
Vaga Desenvolvedor Front-End

Caros,

a Zocprint é o mais novo investimento da Rocket Internet no Brasil. Prestamos serviços gráficos de qualidade pela Internet para microempresários e profissionais liberais a um preço baixo, e sem necessidade de confecção da arte pelo cliente.

Estamos com metas muito agressivas de crescimento e precisamos de talentos para suportá-las. Temos algumas vagas de tecnologia para desenvolvedores especializados em Front-End Web.

Pré-requisitos:

  • Ser ninja em JavaScript
  • Ser faixa-preta em CSS
@hgfischer
hgfischer / config.yml
Created May 10, 2012 18:13 — forked from Spea/deps
Gelf handler implementation for Symfony 2.0
monolog:
handlers:
main:
type: stream
handler: gelf
level: WARNING
gelf:
type: service
id: monolog.gelf_handler
@hgfischer
hgfischer / emacs24-cheat-sheet.md
Last active December 13, 2015 19:38
Emacs 24 Cheat Sheet

EMACS 24 Cheat Sheet

Navigation

File

  • Move to the beginning of file: Meta-<
  • Move to the end of file: Meta->

Pages

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.