Skip to content

Instantly share code, notes, and snippets.

View rodrisan's full-sized avatar
🏠
Working from home

Rodrigo S rodrisan

🏠
Working from home
  • 20:15 (UTC -06:00)
View GitHub Profile
@rodrisan
rodrisan / Slack_solarized_themes
Created May 9, 2018 14:23 — forked from mgreensmith/Slack_solarized_themes
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@rodrisan
rodrisan / osx_setup.md
Created May 9, 2018 14:13 — forked from millermedeiros/osx_setup.md
Mac OS X setup.

Setup Mac OS X Mountain Lion or Mavericks

Edit: I few months ago I got a new laptop and did the same thing on Mavericks.

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the

@rodrisan
rodrisan / iterm2-solarized.md
Created March 23, 2018 18:23 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@rodrisan
rodrisan / .Xdefaults
Created February 22, 2018 17:11 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@rodrisan
rodrisan / git_rename_branch.sh
Created December 11, 2017 23:08 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@rodrisan
rodrisan / manjaro-install.sh
Created September 19, 2017 15:37 — forked from gabrielmoreira/manjaro-install.sh
Manjaro Install script
# Prepare pacman
sudo mkdir -p /root/.gnupg
sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro && sudo pacman-key --refresh-keys
# Remove packages
sudo pacman -R empathy accerciser gnome-chess gnome-sudoku gnome-tetravex polari five-or-more four-in-a-row steam-native ipython hitori gnome-klotski steam quadrapassel gnome-nibbles aisleriot lightsoff gnome-mahjongg gnome-mines iagno gnome-robots tali swell-foop
# Upgrade all
sudo pacman -Syyu
@rodrisan
rodrisan / AppKernel.php
Created June 8, 2017 01:43 — forked from kbond/AppKernel.php
JWT Authentication With Symfony Guard. POST username/password to /login to receive token, /api* requests require a valid token
<?php
// app/AppKernel.php
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
@rodrisan
rodrisan / register-post-type.php
Created January 11, 2017 17:27 — forked from justintadlock/register-post-type.php
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@rodrisan
rodrisan / plugin.php
Created May 24, 2016 20:33 — forked from claudiosanches/plugin.php
WordPress - Custom REST API endpoint example
<?php
add_action( 'rest_api_init', function() {
register_rest_route( 'my-route/v1', '/products/(?P<id>\d+)', array(
'methods' => 'GET',
'callback' => function( $data ) {
$product = wc_get_product( $data['id'] );
if ( empty( $product ) ) {
return null;
}
return $product;