Skip to content

Instantly share code, notes, and snippets.

View rnice01's full-sized avatar
🗾
勉強しています

Rob Nice rnice01

🗾
勉強しています
View GitHub Profile
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@rnice01
rnice01 / gist:7fb5b6a340212ea61ad4ff9368b1ff8b
Created October 1, 2017 17:19 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@rnice01
rnice01 / how-to-squash-commits-in-git.md
Created October 1, 2017 17:15 — forked from patik/how-to-squash-commits-in-git.md
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@rnice01
rnice01 / generator_helper.js
Created June 10, 2017 16:48
null created by rnice4christ - https://repl.it/If6V/9
module.exports = {
getRandomInt(max) {
var min = 0;
return Math.floor((Math.random() * (max - min))) + min;
}
}
@rnice01
rnice01 / main.cs
Created April 10, 2017 00:20
LinkedList Implementation created by rnice4christ - https://repl.it/GzxE/74
namespace LinkedListImplement
{
using System;
class Node
{
public object Data {set; get;}
public Node Next {set; get;}
}