Skip to content

Instantly share code, notes, and snippets.

View felipecsl's full-sized avatar
⚒️
Building

Felipe Lima felipecsl

⚒️
Building
View GitHub Profile
@KensoDev
KensoDev / gist:1323004
Created October 28, 2011 18:34
Kill all resque workers
sudo kill -9 `ps aux | grep [r]esque | grep -v grep | cut -c 10-16`
@rmurphey
rmurphey / gist:1329222
Last active September 27, 2015 20:47
New computer setup notes

Bootstrap

  • Run software update
  • Download & install XCode in App Store
  • Install Google Chrome and enable syncing -- ensure 3rd party cookies are disabled
  • Install homebrew
  • brew install git
  • brew install wget
  • Copy ssh keys
  • git clone git@github.com:rmurphey/dotfiles.git
@etorreborre
etorreborre / gist:1387113
Created November 22, 2011 21:50
An example of a non-terminating compilation with javac
/** from http://www.reddit.com/r/programming/comments/mlbna/scala_feels_like_ejb_2/c31z0co */
interface Pong<T> {}
class Ping<T> implements Pong<Pong<? super Ping<Ping<T>>>> {
static void Ping() {
Pong<? super Ping<Long>> Ping = new Ping<Long>();
}
}
> javac Ping.java
@arikfr
arikfr / .monitrc
Created December 13, 2010 14:35
Setting Monit to work with Gmail as mail server
set mailserver smtp.gmail.com port 587 username "user@domain.com" password "password" using tlsv1 with timeout 30 seconds
@joaomilho
joaomilho / peano.ts
Created November 3, 2020 16:43
Fully typed arithmetics with TypeScript 😨
type Nat = ["S", Nat] | ["Z"];
type Succ<N extends Nat> = ["S", N]
type S<N extends Nat> = Succ<N>
type Prev<N extends Nat> = N[1]
type Z = ["Z"]
type Zero = Z
type One = S<Z>
type Two = S<S<Z>>
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select
@JakeWharton
JakeWharton / AutoGson.java
Last active November 28, 2021 12:32
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
@pmarreck
pmarreck / ruby_email_rfc_5322_regexp.rb
Last active February 15, 2022 21:17
RFC 5322 Email Validation Regex in Ruby Regular Expressions
# RFC 5322 Email Validation Regex in Ruby
# This work is released under the BSD 3-Clause License
# http://choosealicense.com/licenses/bsd-3-clause/
# Copyleft (ɔ) 2013, Peter R. Marreck
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
@Yopadd
Yopadd / async-flat-map.js
Created February 16, 2018 07:15
return a flatten map resolved by async function
async function asyncFlatMap (arr, asyncFn) {
return Promise.all(flatten(await asyncMap(arr, asyncFn)))
}
function asyncMap (arr, asyncFn) {
return Promise.all(arr.map(asyncFn))
}
function flatMap (arr, fn) {
return flatten(arr.map(fn))
@adamveld12
adamveld12 / spec.md
Created October 31, 2015 06:49
Nes Emulator tips

NES emulator development guide


Brad Taylor (BTTDgroup@hotmail.com) 4th release: April 23rd, 2004 Thanks to the NES community. http://nesdev.parodius.com. recommended literature: 2A03/2C02/FDS technical reference documents

Overview of document