Skip to content

Instantly share code, notes, and snippets.

Rui Barbosa Narayon

Block or report user

Report or block Narayon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Narayon
Narayon / osx_bootstrap.sh
Created Apr 25, 2018 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
View osx_bootstrap.sh
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Newton (app store)
View keybase.md

Keybase proof

I hereby claim:

  • I am narayon on github.
  • I am narayon (https://keybase.io/narayon) on keybase.
  • I have a public key ASAInUGjO1eaI4pdabI7CM6B2AZpIWk-kPC3n-v3uuRHTQo

To claim this, I am signing this object:

@Narayon
Narayon / vagrant-scp
Last active Apr 8, 2018 — forked from geedew/vagrant-scp
Copying files from and to a Vagrant VM
View vagrant-scp
#!/bin/sh
# Change these settings to match what you are wanting to do
FILE=/File/To/Copy
PATH=/Where/To/Put/File
OPTIONS=`vagrant ssh-config | grep -v '^Host ' | awk -v ORS=' ' 'NF{print "-o " $1 "=" $2}'`
# copy from host to vagrant
# scp ${OPTIONS} $FILE v:$PATH
@Narayon
Narayon / get-template-page-url.php
Created Jul 5, 2017
WP - Get link of page with specific template
View get-template-page-url.php
<?php
function get_template_page_url( $template_name ) {
$url = null;
$pages = new \WP_Query( array(
'post_type' => 'page',
'meta_key' => '_wp_page_template',
'meta_value' => $template_name,
) );
@Narayon
Narayon / config_mac.md
Created Mar 6, 2017
Config MacOs machine
View config_mac.md

macOS

Custom recipe to get macOS running from scratch, setup applications and (WordPress) developer environment. I use this gist to keep the steps required to have a functioning system after a semi-annual fresh install.

Software

Browsers

System

@Narayon
Narayon / pubsub.js
Created Feb 24, 2017
Angular v1 Pub-Sub
View pubsub.js
// an example channel service that lets consumers
// subscribe and publish for nuclear reactor meltdowns
var CoreReactorChannel = function($rootScope) {
// local constants for the message ids.
// these are private implementation detail
var ELEVATED_CORE_TEMPERATURE_MESSAGE = "elevatedCoreMessage";
// publish elevatedCoreTemperature
View wp-query-ref.php
<?php
/**
* WordPress Query Comprehensive Reference.
*
* All credits go to luetkemj. Thanks!
*
* @author luetkemj <luetkemj@gmail.com>
* @author s3rgiosan <me@s3rgiosan.com>
*
* @see http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
@Narayon
Narayon / block-scroll.css
Last active Apr 8, 2018 — forked from davidgilbertson/block-scroll.css
Don't resize the body when you open a modal
View block-scroll.css
/* the page should not change width as content is loaded */
body {
overflow-y: scroll;
}
/* block scrolling without losing the scroll bar and shifting the page */
/* add this class when a modal is open */
body.block-scroll {
overflow: hidden;
overflow-y: scroll !important;
@Narayon
Narayon / ionic-kill-it.sh
Created Jan 4, 2017
Ionic - Kill it with Fire!
View ionic-kill-it.sh
rm -rf ./plugins
rm -rf ./node_modules
rm -rf ./www/lib
ionic platform rm android
ionic platform rm ios
npm install
bower install
@Narayon
Narayon / gulpfile.js
Created Aug 25, 2016 — forked from jadsalhani/gulpfile.js
Ionic Tutorial
View gulpfile.js
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var uglify = require('gulp-uglify');
var mainBowerFiles = require('main-bower-files');
You can’t perform that action at this time.