Skip to content

Instantly share code, notes, and snippets.

View endSly's full-sized avatar

Endika Gutiérrez endSly

View GitHub Profile
@endSly
endSly / brew-java-and-jenv.md
Created November 8, 2016 12:46 — forked from tomysmile/brew-java-and-jenv.md
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again:

@endSly
endSly / int_test.cr
Last active November 19, 2016 23:02
require "benchmark"
lib IntIntrinsics
{% for oper in %i(sadd ssub smul) %}
{% for name, type in {i16: Int16, i32: Int32, i64: Int64} %}
fun {{oper.id}}_with_overflow_{{name}} = "llvm.{{oper.id}}.with.overflow.{{name}}"(a : {{type}}, b : {{type}}) : { {{type}}, Bool }
{% end %}
{% end %}
{% for oper in %i(uadd usub umul) %}
{% for name, type in {i16: UInt16, i32: UInt32, i64: UInt64} %}
@endSly
endSly / flexget.yml
Last active March 13, 2016 18:27
~/.config/flexget/config.yml
templates:
transmission_config:
transmission:
host: "192.168.1.2"
port: 9091
deluge_config:
deluge:
host: localhost
port: 58846
@endSly
endSly / Piperita.terminal
Last active January 19, 2017 07:55
Custom.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjI5OTE1MzMyNzkgMC4yOTkyNTI0NTA1IDAuMjk5MTAwMzY5MgAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# execute at home
cd
# Install Xcode
xcode-select --install
# Download gitconfig
curl -O https://gist.githubusercontent.com/endSly/0d2e9a7e6d3cf44a274a/raw/.gitconfig
curl -O https://gist.githubusercontent.com/endSly/fe1a8b44782d5a6f99c8/raw/.gitignore_global
#!/usr/bin/env ruby
require 'english'
require 'rubocop'
ADDED_OR_MODIFIED = /A|AM|^M/.freeze
changed_files = `git status --porcelain`.split(/\n/).
select { |file_name_with_status|
file_name_with_status =~ ADDED_OR_MODIFIED
@endSly
endSly / ProjectErbToHaml
Created February 24, 2014 20:31
Project Erb To Haml
find . -name '*erb' | xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | bash
find . -name '*erb' | xargs rm -rf ARGV
[core]
editor = vim
excludesfile = ~/.gitignore_global
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of
# a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on OS X
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
@endSly
endSly / sslconnect.c
Last active May 13, 2020 16:35
Example code for building a SSL connection and retrieving the server certificate
/* ------------------------------------------------------------ *
* file: sslconnect.c *
* purpose: Example code for building a SSL connection and *
* retrieving the server certificate *
* author: 06/12/2012 Frank4DD *
* *
* gcc -lssl -lcrypto -o sslconnect sslconnect.c *
* ------------------------------------------------------------ */
#include <sys/socket.h>