Skip to content

Instantly share code, notes, and snippets.

View brynmrk's full-sized avatar
🐛
Finding a bug!

Bryan Mark Fajutag brynmrk

🐛
Finding a bug!
View GitHub Profile
# If you come from bash you might have to change your $PATH.
export PATH="/usr/local/bin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="pygmalion"
@brynmrk
brynmrk / create_sudo_user_ubuntu.md
Last active June 4, 2019 06:26
[DIGITALOCEAN] How To Deploy a Rails App with Unicorn and Nginx on Ubuntu 18.04

How To Create a Sudo User on Ubuntu

The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on Ubuntu, without having to modify your server's sudoers file. If you want to configure sudo for an existing user, simply skip to step 3.

Steps to Create a New Sudo User

  1. Log in to your server as the root user.
@brynmrk
brynmrk / jquery-palette-color-picker.js
Created November 8, 2018 05:06
JQuery Palette Color Picker v1.13 by Carlos Cabo ( @putuko )
/*!
* JQuery Palette Color Picker v1.13 by Carlos Cabo ( @putuko )
* https://github.com/carloscabo/jquery-palette-color-picker
*/
(function($) {
// La magia aquí
'use strict';
// Public core
$.paletteColorPicker = function( el, options ) {
@brynmrk
brynmrk / timeago.js
Last active November 8, 2018 04:41
Time Ago in under 70 lines of JavaScript - By AJ ONeal
var en = {
moment: "a moment ago"
, moments: "moments ago"
, seconds: "%s seconds ago"
, minute: "a minute ago"
, minutes: "%m minutes ago"
, hour: "an hour ago"
, hours: "%h hours ago"
, day: "a day ago"
, days: "%D days ago"
@brynmrk
brynmrk / 0-media-query-snippets.md
Created November 5, 2018 09:15 — forked from rstacruz/0-media-query-snippets.md
Media query snippets

Media query snippets

Type b4+ then press TAB. It expands to

@media (min-width: $screen-xs-min) { // > 480px

Snippets

@brynmrk
brynmrk / git_aliases
Last active July 20, 2021 14:50
Git Alias in Mac
# git aliases copied from OSX
alias g=git
alias ga='git add'
alias gaa='git add --all'
alias gap='git apply'
alias gapa='git add --patch'
alias gau='git add --update'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
@brynmrk
brynmrk / vs_code_settings.settings
Last active February 4, 2021 11:39
Visual Studio Code Settings
// Place your settings in this file to overwrite default and user settings.
{
"window.zoomLevel": -2,
"editor.tabSize": 2,
"terminal.integrated.shellArgs.osx": [
"-l"
],
"workbench.startupEditor": "none",
"workbench.colorTheme": "One Dark Pro",
"files.autoSave": "afterDelay",
@brynmrk
brynmrk / index.md
Created August 14, 2017 08:50 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@brynmrk
brynmrk / webpack_c9.sh
Created August 14, 2017 08:15 — forked from kdabir/webpack_c9.sh
Running webpack on c9.io
webpack-dev-server --progress --colors --host $IP --port $PORT
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do