Skip to content

Instantly share code, notes, and snippets.

View sgnl's full-sized avatar
🍪
Do you agree to share your cookies?

Ray Farias sgnl

🍪
Do you agree to share your cookies?
  • Honolulu, Hawaii
View GitHub Profile
osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title" subtitle "subtitle"'
@sgnl
sgnl / gist:0180cea3e7eacebd336cc39d285d0435
Created April 19, 2017 18:55 — forked from jaywon/gist:c76abc57dc33e1679c02
Circular String Brain Bender

###Good Morning Agents

Your challenge this morning is to create a function that implements an algorithm using the concepts we've covered this week.

###Challenge

  1. Write an algorithm that takes in 2 strings as parameters (source, find).
  2. Your function should return true if the string passed in as the find parameter is found in the source parameter if source were circular in nature. Meaning there is no end to the source string.
  3. Important: A match would be true if the word to find is partially at the end of the word and at the beginning in sequence.

Ex.

@sgnl
sgnl / block_family.md
Last active February 10, 2018 20:18 — forked from kellishouts/block_family.md
Block Family

Block Family

Set up:

  1. Run gulp. This project uses the Gulp + Sass + Browser-sync project boilerplate, however all of this should already be set up for you.

Media Queries/Sass Block Family Exercise:

@sgnl
sgnl / gulp-scss-livereload.md
Created December 20, 2015 00:18 — forked from kellishouts/gulp-scss-livereload.md
Gulp + SCSS + LiveReload - Updated 12/18/2015

Gulp + SCSS + LiveReload

This Gist outlines the gulp workflow that will:

  1. watch for any scss changes, then compiles scss source into css
  2. watch for any changes in the public directory, and trigger live-reload
  3. serve static content in public/

This Gist also assumes you already know how to install npm modules, gitignore, create directories and create files via the command line.

@sgnl
sgnl / LiveCoding Instructions
Created October 28, 2015 01:12 — forked from iiegor/LiveCoding Instructions
Instructions to setup external streaming and chatting for livecoding.tv streams
// ************** Instructions for connecting to the LiveCoding chatrooms from a 3rd party application. ****************
Step 1a (Ubuntu/ any OS with aptitude (aka apt-get)) :
sudo apt-add-repository ppa:rsrchboy/profanity && sudo apt-get update
apt-get install profanity
--
Step 1b (OSX w/ homebrew):
$ brew install profanity
--------

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sgnl
sgnl / tmux.conf
Last active August 29, 2015 14:24 — forked from spicycode/tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@sgnl
sgnl / Ruh-Roh.md
Last active August 29, 2015 14:22 — forked from jaywon/Ruh-Roh.md

###Email Hell

We just found out that there is a bug in production that our e-mail function was iterating errantly and sending duplicate e-mails to many users. We need to fix this quickly but we don't want to send out a mass apology letter to all of our users.

Our sysadmin gave us the SMTP logs and we need to process the logs and identify which users received multiple e-mails so that we can directly send them a follow up e-mail explaining the situation and offer super cool swag to keep them on as customers.

Also, the boss wants this done ASAP, we don't have time to do this manually...HAAALLLLPPP!

###The Fix

Rock Paper Fireball

The Game

Rock paper fireball is a classic 2 player game.
Each player chooses either rock, paper or fireball.
The possible outcomes:

  • Rock blocks fireball.
  • Fireball engulfs paper.
  • Paper covers rock.

Red Green Blue

Exercise with Media Queries

Create a standard html5 setup linking an external stylesheet.

index.html
stylesheets/
 styles.css