Skip to content

Instantly share code, notes, and snippets.

View smarquez1's full-sized avatar
👨‍💻

Sergio Marquez smarquez1

👨‍💻
View GitHub Profile
module YourApp
class Application < Rails::Application
# Convenience for loading config/foo.yml for the current Rails env.
#
# Example:
#
# config/cleversafe.yml:
#
# production:
# url: http://127.0.0.1:8080
@pslobo
pslobo / .tmux.conf
Created May 30, 2017 13:18 — forked from BretFisher/.tmux.conf
My ugly tmux config, much copied from others and tweaked
# tmux config for ultimate winning
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
# use this if italic enabled in term profile
set -g default-terminal "tmux-256color"
# set just true color without custom term
#set -ga terminal-overrides ",xterm-256color:Tc"
# fixes bug: https://github.com/tmux/tmux/issues/435
#set -ga terminal-overrides ',xterm*:sitm=\E[3m'
anonymous
anonymous / 01-emoji.conf
Created September 13, 2016 12:08
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Emoji config -->
<alias>
<family>Apple Color Emoji</family>
<prefer><family>emoji</family></prefer>
</alias>
<alias>
<family>Segoe UI Emoji</family>
// Working Version :)
import React from 'react';
import {NextPageContext} from "next";
import {i18n} from '../../i18n'
import ReactMarkdown from "react-markdown";
import matter from "gray-matter";
import StandardPage from "../../components/layout/standard-page";
import {MDXProvider} from "@mdx-js/react";
@davidjrice
davidjrice / gist:3d923a6920d80dad7b22
Created October 30, 2015 12:59 — forked from gwik/gist:6298001
Database setup and seeds for Rails, RSpec, Capybara, DatabaseCleaner and friends
# Database setup and seeds loading
# See the block post : http://sigkill.tumblr.com/post/58933579738/test-database-setup-and-seeds-with-rails-rspec
module Seeder
@@__cache__ = {}
def self.load_seed(filename, prefix='app')
filename = Rails.root + "db/seeds/#{prefix}/#{filename}.seeds.rb"
seed_mod = @@__cache__[filename] ||= begin
mod = Module.new
@remarkablemark
remarkablemark / README.md
Last active November 12, 2023 07:52
Classes - ES5 vs ES6

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

Reference

require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@huytd
huytd / .gitconfig
Created August 4, 2016 16:26
Use neovim as diff tool
[merge]
tool = vimdiff
[mergetool]
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[difftool]
prompt = false
[diff]
tool = vimdiff
# Reconstructed via infocmp from file: /usr/share/terminfo/t/tmux-256color
tmux-256color|tmux with 256 colors,
OTbs, OTpt, am, hs, km, mir, msgr, xenl, AX, G0,
colors#256, cols#80, it#8, lines#24, pairs#32767, U8#1,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
@jhwheeler
jhwheeler / bigONotation.js
Last active February 21, 2024 18:36
Big O Notation Exercises
// 1. Even or odd
function isEven(value){
if (value % 2 == 0){
return true;
}
else
return false;
}