Skip to content

Instantly share code, notes, and snippets.

View colmarius's full-sized avatar
💭
🎶 🎹

Marius Colacioiu colmarius

💭
🎶 🎹
View GitHub Profile
@colmarius
colmarius / README.md
Created August 31, 2017 11:30 — forked from curran/README.md
The Iris Dataset

This is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.

The HTML page provides the basic code required to load the data and display it on the page (as JSON) using D3.js.

Built with blockbuilder.org

web counter
@colmarius
colmarius / react-redux.md
Last active March 11, 2017 16:24
React / Redux workshop takeaways at Socrates CH

Starting with React / Redux workshop

React

  • create-react-app: React app generator, easiest way to start with React
  • [React Daily UI]: React implementations of daily UI challenges
  • Book [FullStack React]: practical tutorials + code examples, covers topics on React, Redux, Testing, GraphQL and more
@colmarius
colmarius / redux-connect-todo-app-refactor.js
Last active January 19, 2017 10:45
Redux egghead.io course: refactor with connect to create containers which use presentational components
const todo = (state, action) => {
switch (action.type) {
case 'ADD_TODO':
return {
id: action.id,
text: action.text,
completed: false
};
case 'TOGGLE_TODO':
if (state.id !== action.id) {
@colmarius
colmarius / PostgreSQL_Upgrade.md
Last active July 8, 2016 05:49
PostgreSQL Upgrade

Inspired by this tip

Example of upgrading PostgreSQL from 9.3 to latest 9.5

Stop running application and services

Create a database backup

Stop any running postgres instance

@colmarius
colmarius / Ephemeral.rb
Last active May 20, 2016 21:42
Playing with ephemeral gem
#
# Playing with ephemeral gem
#
# - https://github.com/CoralineAda/ephemeral/
class Base
include Ephemeral::Base
def initialize(args={}); args.each{|k,v| self.send("#{k}=", v)}; end
end
@colmarius
colmarius / keybase.md
Created April 5, 2016 11:27
keybase.md

Keybase proof

I hereby claim:

  • I am colmarius on github.
  • I am colmarius (https://keybase.io/colmarius) on keybase.
  • I have a public key whose fingerprint is F2A6 4700 5AB9 3F22 8E30 9F3D 1701 A84E 226C 57CF

To claim this, I am signing this object:

@colmarius
colmarius / test_rotr.rb
Last active August 29, 2015 14:24
Solve rotr for hidden string
#!/usr/bin/env ruby
# Solved from https://docs.google.com/forms/d/1h6LtvCS3tVosk1-dbEsX54DsLxE6Xg9tTWUT2C-JqMk/viewform
hidden_string = 'bddpvout ejggfsfou gps qbttxpse b sfvtf opu Ep'
def rotr_word(word, number)
letters = word.split('')
.map do |letter|
(letter.ord + number).chr
@colmarius
colmarius / stack_kata_steps.txt
Created March 5, 2015 12:42
Stack kata steps
# newly created stacks should be empty
# after one push stack size should be one
# after one push and one pop should be empty
# when pushed past limit stack overflows
# when empty stack popped should throw underflow
# when one is pushed one is popped
# when one and two are pushed two and one are popped
# when creating stack with negative size should throw illegal capacity
# when creating stack with zero capacity any push should overflow
# when one is pushed one is on top
@colmarius
colmarius / git-aliases.md
Created September 23, 2014 09:50
A list of useful git aliases

Intro

Bellow follows a list of aliases, split between beginner and advanced.

To start using them right away you should place the aliases you like most in a file like ~/.zsh/git. Now all that remains is to add the following line to your ~/.zshrc or ~/.bashrc:

. ~/.zsh/git # git aliases
@colmarius
colmarius / tmux-tmuxinator-setup.md
Last active August 2, 2024 21:31
Project start/stop with tmux + tmuxinator

1. Install tmux + tmuxinator

gem install tmuxinator

2. Add ~/.tmuxinator project specific configurations

# File: ~/.tmuxinator/project-name.yml

name: project-name