Skip to content

Instantly share code, notes, and snippets.

View matehat's full-sized avatar

Mathieu D'Amours matehat

View GitHub Profile
@matehat
matehat / 1-setup.md
Created January 14, 2021 14:16 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@matehat
matehat / too_many_warnings.ex
Created February 28, 2016 17:12 — forked from CharlesOkwuagwu/too_many_warnings.ex
too many warnings
defp send_messages(msg_list, s, do_timer_reset) do
if do_timer_reset do
if s.acks != [] do
ids = s.acks
s = %{s | acks: []}
log "adding acks: #{inspect ids}"
msg_list = msg_list ++ [{TL.msgs_ack(ids), false}]
end
# if s.resends != [] do
@matehat
matehat / LevelDB.m
Last active August 29, 2015 14:04 — forked from jpsim/LevelDB.m
#import <Objective-LevelDB/LevelDB.h>
#import <Objective-LevelDB/LDBWriteBatch.h>
#include <mach/mach_time.h>
#include <stdint.h>
NSString *randomString(NSUInteger length) {
NSMutableString *string = [NSMutableString stringWithCapacity:length];
for (int i = 0; i < length; i++) {
[string appendFormat:@"%C", (unichar)('a' + arc4random_uniform(25))];
}
@matehat
matehat / Install_tmux
Created February 27, 2014 01:43 — forked from simme/Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@matehat
matehat / erlang.rb
Created October 25, 2013 19:44 — forked from dch/erlang.rb
require 'formula'
class ErlangManuals < Formula
url 'http://erlang.org/download/otp_doc_man_R16B01.tar.gz'
sha1 '57ef01620386108db83ef13921313e600d351d44'
end
class ErlangHtmls < Formula
url 'http://erlang.org/download/otp_doc_html_R16B01.tar.gz'
sha1 '6741e15e0b3e58736987e38fb8803084078ff99f'
clickBool = false
contentClick = ->
clickBool = not a
@animate
opacity: 0.0
marginTop: '-1000'
, 750, ->
element = if a then param is "virtualsystem" else "splash"
($ '##{element}').css
@matehat
matehat / setup-macosx-neurolab.sh
Created April 18, 2011 13:47 — forked from mja/homebrew_scipy.sh
Install every dependency to make NeuroLab work properly
echo "Installing core packages"
brew install gfortran
brew install python
brew install distribute
brew install mongodb
brew install hdf5
brew install ghostscript
brew install git
echo "Installing custom python libraries"
class UsingNode extends BaseNode
type: 'Using'
constructor: (object, methods) ->
@object: object
@methods: methods
compile_node: (o) ->
if @methods[0] == "*"
"for(var p in $@object) eval('var ' + p + '=' + $@object[p])"
[err, files]: fs.readdir 'test', defer
files.forEach (file) ->
return unless file.ext is '.coffee'
[err, code]: fs.readFile file, defer
CoffeeScript.run code
=>
fs.readdir('test', (function(__this) {
var __func = function() {