Skip to content

Instantly share code, notes, and snippets.

View danielmt's full-sized avatar

Daniel Tavares danielmt

  • Crystal Intelligence
  • London, UK
View GitHub Profile
@danielmt
danielmt / gist:3180231
Created July 26, 2012 04:19
homebrew pkg-config 0.27 failed build log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pkg-config configure 0.27, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.27 --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig --with-internal-glib
## --------- ##
## Platform. ##
@danielmt
danielmt / gist:3180236
Created July 26, 2012 04:21
brew --config
HOMEBREW_VERSION: 0.9.2
HEAD: 29b2eb06fc9e316f708723c87a510b6152860274
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8-x86_64
Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
GCC-4.0: N/A
GCC-4.2: N/A
@danielmt
danielmt / index.html
Created August 30, 2012 23:21
bootstrap overrides pjax on navbar dropdown links
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>bootstrap+pjax dropdown bug</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@danielmt
danielmt / crispy-forms bs3 css classes patch
Last active December 21, 2015 04:29
Extends crispy-forms templates support for bootstrap3 adding classes for field and label. (INCOMPLETE)
diff --git a/crispy_forms/templates/bootstrap3/field.html b/crispy_forms/templates/bootstrap3/field.html
index 466160d..a7cfd45 100644
--- a/crispy_forms/templates/bootstrap3/field.html
+++ b/crispy_forms/templates/bootstrap3/field.html
@@ -5,7 +5,7 @@
{% else %}
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" class="form-group{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors%}{% if field.errors %} has-error{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% if field.label and not field|is_checkbox and form_show_labels %}
- <label for="{{ field.id_for_label }}" class="control-label {% if field.field.required %}requiredField{% endif %}">
+ <label for="{{ field.id_for_label }}" class="control-label {{ label_class }}{% if field.field.required %} requiredField{% endif %}">
@danielmt
danielmt / gist:faafb19a85c64dfd6233
Last active August 29, 2015 14:08
sparkcore on mac
gcc-arm on mac, for compiling sparkcore firmware:
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi-48 dfu-util
@danielmt
danielmt / gist:3952953c9598d15919cd
Last active August 29, 2015 14:09 — forked from cridenour/gist:74e7635275331d5afa6b
Setting up Vim as your Go IDE

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.

@danielmt
danielmt / sublime_autoreveal.py
Created November 17, 2014 17:05
Auto reveal file in sidebar when activated
import sublime, sublime_plugin
class AutoRevealInSideBar(sublime_plugin.EventListener):
def on_activated(self, view):
view.window().run_command('reveal_in_side_bar')
@danielmt
danielmt / optimize-ssd.md
Created September 20, 2016 21:32 — forked from bylatt/optimize-ssd.md
Optimize non-Apple SSDs on OS X.

Optimize non-Apple SSDs on OS X. (Run the following commands in the terminal.)

Enable TRIM support

Check IOAHCIBlockStorage version:

open /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
INFO global: Vagrant version: 1.9.1
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_TMPDIR="/var/folders/dj/7yxj40ss1q9b31563bfz_ls80000gn/T/"
INFO global: VAGRANT_OLD_ENV_PR_BLACK="%{\e[22;30m%}"
INFO global: VAGRANT_OLD_ENV_PR_BOLD_YELLOW="%{\e[01;33m%}"
INFO global: VAGRANT_OLD_ENV_DEFAULT_USER="daniel"
INFO global: VAGRANT_OLD_ENV_NVM_NODEJS_ORG_MIRROR="https://nodejs.org/dist"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_OLD_ENV_TZ="America/Sao_Paulo"

Keybase proof

I hereby claim:

  • I am danielmt on github.
  • I am dostioffski (https://keybase.io/dostioffski) on keybase.
  • I have a public key whose fingerprint is CB8C 105D 5240 C374 B311 0F22 8C43 72D9 9C97 CED6

To claim this, I am signing this object: