Skip to content

Instantly share code, notes, and snippets.

View FerPerales's full-sized avatar
🎯
Focusing

Fernando Perales FerPerales

🎯
Focusing
View GitHub Profile
/** El ejemplo de aqui muestra como cargar una ontologia
* cualquiera, ya sea de la Web o de una copia local.
*
* @throws OWLOntologyCreationException */
public void cargarOntologia() throws OWLOntologyCreationException
{
// Generar nuestro manejador de ontologias.
OWLOntologyManager manejador = OWLManager.createOWLOntologyManager();
// Primero probando a cargar una ontologia desde la Web
rand_port(){
port=$(( 1000+( $(od -An -N2 -i /dev/random) )%(1023+1) ))
while :
do
(echo >/dev/tcp/localhost/$port) &>/dev/null && port=$(( 1000+( $(od -An -N2 -i /dev/random) )%(1023+1) )) || break
done
echo "$port"
}
phpmin(){
require "github_api"
user = ''
token = ''
github = Github.new oauth_token: token
coderwall_orgs = []
github.orgs.list.each do |org|
coderwall_orgs << org.login if org.login =~ /^coderwall/
$('.modal')
.on('shown', function(){
$('body').css({overflow: 'hidden'});
})
.on('hidden', function(){
$('body').css({overflow: ''});
});
@FerPerales
FerPerales / nginx.conf
Last active August 29, 2015 14:08 — forked from billie66/nginx.conf
# This file should be placed on the directory of ~/blog/config
upstream unicorn {
server unix:/tmp/unicorn.todo.socket fail_timeout=0;
}
server {
listen 80 default;
#server_name example.com;
root /home/username/blog/public;
require 'securerandom'
require 'em-http-request'
require 'pry-nav'
require 'json'
require 'faye/websocket'
require 'eventmachine'
require 'rest_client'
class WTV
def initialize(my_id, my_token)
@FerPerales
FerPerales / db.rake
Last active August 29, 2015 14:23 — forked from tehpeh/db.rake
namespace :db do
namespace :enable do
desc "enable hstore extension"
task :hstore => [:environment, :load_config] do
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;')
end
end
Rake::Task['db:schema:load'].enhance ['db:enable:hstore']
end
@FerPerales
FerPerales / ml-ruby.md
Created May 9, 2016 15:32 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

@FerPerales
FerPerales / setup.md
Last active August 1, 2017 02:25 — forked from chris-jamieson/setup.md
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • sudo mkdir /opt/franz
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-4.9.4.tgz -C /opt/franz
  • sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would