Skip to content

Instantly share code, notes, and snippets.

View ZilvinasKucinskas's full-sized avatar
:octocat:
Trust Me, I’am Software Engineer

Zilvinas Kucinskas ZilvinasKucinskas

:octocat:
Trust Me, I’am Software Engineer
View GitHub Profile
@ZilvinasKucinskas
ZilvinasKucinskas / facebook.rb
Created May 9, 2018 11:47 — forked from a14m/facebook.rb
Gist for manually OAuth2 facebook for Rails APIs
# lib/omniauth/facebook.rb
require 'httparty'
module Omniauth
class Facebook
include HTTParty
# The base uri for facebook graph API
base_uri 'https://graph.facebook.com/v2.3'
@ZilvinasKucinskas
ZilvinasKucinskas / Gemfile
Created April 25, 2018 13:01 — forked from goncalvesjoao/Gemfile
Changes you need to make in order to make Devise use JWT Header Authentication
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile"
gem 'jwt'
@ZilvinasKucinskas
ZilvinasKucinskas / introrx.md
Created October 11, 2016 08:18 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

@ZilvinasKucinskas
ZilvinasKucinskas / git-feature-workflow.md
Created March 22, 2016 14:09 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@ZilvinasKucinskas
ZilvinasKucinskas / frontendDevlopmentBookmarks.md
Created February 3, 2016 11:46 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
apply plugin: 'java'
apply plugin: 'scala'
// For those using Eclipse or IntelliJ IDEA
apply plugin: 'eclipse'
apply plugin: 'idea'
def findPlay20(){
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null }
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){
for(playExec in ['play.bat', 'play.sh', 'play']){