Skip to content

Instantly share code, notes, and snippets.

View IsmiKin's full-sized avatar
🐺

Ismael Ors IsmiKin

🐺
View GitHub Profile
@IsmiKin
IsmiKin / bash_profile.sh
Created February 12, 2020 13:39
Kill process by port
lsof -i:3001 -Fp | head -n 1 | sed 's/^p//' | xargs kill
alias kbp='killByPort'
killByPort() {
lsof -i:$1 -Fp | head -n 1 | sed 's/^p//' | xargs kill
}
@IsmiKin
IsmiKin / Makefile
Created July 17, 2019 10:47 — forked from aprxi/Makefile
Makefile_docker_20190214
# --------------------------------------------------------------------
# Copyright (c) 2019 LINKIT, The Netherlands. All Rights Reserved.
# Author(s): Anthony Potappel
#
# This software may be modified and distributed under the terms of the
# MIT license. See the LICENSE file for details.
# --------------------------------------------------------------------
# If you see pwd_unknown showing up, this is why. Re-calibrate your system.
PWD ?= pwd_unknown
@IsmiKin
IsmiKin / diff_two_branches_commits.sh
Created June 26, 2019 14:08
Diff two branches commits
colordiff -y <(git log --author=ismikin -n 5 --pretty=oneline) <(git log --author=ismikin -n 5 --pretty=oneline master)
@IsmiKin
IsmiKin / os_machine_checker.sh
Created June 22, 2019 11:32
Checker machine OS
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
echo ${machine}
@IsmiKin
IsmiKin / docker-compose.yaml
Last active November 23, 2018 13:01
Docker compose postgres + postgres admin
version: '3.1'
services:
db:
image: postgres
restart: always
volumes:
# uncomment to maintan persistance
#- ./postgresql/:/var/lib/postgresql/data/
@IsmiKin
IsmiKin / bigger_difference_splitting_array.py
Last active November 18, 2018 13:06
Codility challenges
def fifth_algorithm(data):
min_left = data.pop(0)
max_left = min_left
min_right = None
max_right = max(data)
overpass_max = False if min_left < max_right else True
difference = abs(min_left - max_right)
@IsmiKin
IsmiKin / play1.js
Last active February 19, 2018 16:57
Tableschema test playground
const {Table} = require('tableschema')
const content = [['date_column', 'integer_column', 'string_column'],
['01-01-2017', '100', 'lala'],
['01-01-2017', '200', 'coco'],
['01-01-2018', '300', 'cucu'],
['01-01-2017', '200', 'wakaka']
]
// Linux ("\n"), Apple ("\r") and Windows ("\r\n") row delimiters.
@IsmiKin
IsmiKin / rails_resources.md
Last active August 29, 2015 14:22 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@IsmiKin
IsmiKin / javascript_resources.md
Last active August 29, 2015 14:22 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@IsmiKin
IsmiKin / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console