Skip to content

Instantly share code, notes, and snippets.

🤓
🦀

Felipe Lima felipecsl

🤓
🦀
Block or report user

Report or block felipecsl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luisbebop
luisbebop / install-rbenv-amazon-linux-ami.sh
Created Nov 26, 2017
Install rbenv on Amazon Linux AMI
View install-rbenv-amazon-linux-ami.sh
sudo yum install -y git gcc make readline-devel openssl-devel
git clone git://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install ruby-build system-widely
git clone git://github.com/rbenv/ruby-build.git /tmp/ruby-build
cd /tmp/ruby-build
@tmelz
tmelz / pre-commit.sh
Last active Feb 28, 2018
auto format java files with google-java-format
View pre-commit.sh
#!/bin/bash
# Auto format changed java files using google-java-format.
# To install, copy this file into $repo/.git/hooks and remove the .sh extension.
# Download the google-java-format JAR from
# https://github.com/google/google-java-format
# A more mature implementation of this would be a plugin for Yelp's pre-commit library:
# http://pre-commit.com/
echo "Running auto-formatter for any changed Java files"
echo "(formatting changes will be automatically added to your commit)"
@eerwitt
eerwitt / load_jpeg_with_tensorflow.py
Created Jan 31, 2016
Example loading multiple JPEG files with TensorFlow and make them available as Tensors with the shape [[R, G, B], ... ].
View load_jpeg_with_tensorflow.py
# Typical setup to include TensorFlow.
import tensorflow as tf
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("./images/*.jpg"))
# Read an entire image file which is required since they're JPEGs, if the images
# are too large they could be split in advance to smaller files or use the Fixed
@adamveld12
adamveld12 / spec.md
Created Oct 31, 2015
Nes Emulator tips
View spec.md

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

@suicide
suicide / artifactory-get.sh
Last active Sep 13, 2019
Downloads latest artifact version from artifactory
View artifactory-get.sh
#!/bin/bash
# downloads latest version of an artifact from artifactory
set -e
usage(){
echo "Usage: $*" >&2
exit 64
}
@mbostock
mbostock / .block
Last active Jun 21, 2019
Screen Recording to GIF
View .block
license: gpl-3.0
@diogopms
diogopms / videoinfo.js
Created Oct 8, 2014
Get video information using ffprobe and url
View videoinfo.js
var exec = require('child_process').exec;
var url = 'https://URL';
var command = 'curl --silent ' + url + '| ffprobe pipe:0 -print_format json -show_format';
exec(command, function callback(error, stdout, stderr){
if(stderr.indexOf("Invalid data") > -1) {
console.log("Error!");
}
@JakeWharton
JakeWharton / AutoGson.java
Last active May 12, 2019
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
View AutoGson.java
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>
@dmarcato
dmarcato / strip_play_services.gradle
Last active Jun 19, 2019
Gradle task to strip unused packages on Google Play Services library
View strip_play_services.gradle
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@staltz
staltz / introrx.md
Last active Nov 12, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.