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

#PidginScript ###or BrahScript

variable assignment => dakine example: dakine name stay "Jon"

NULL => sostay
= operator => stay

!= operator => not

@sgnl
sgnl / gist:9983808
Last active August 29, 2015 13:58
Setting up SSH and .git/config to work with BitBucket
//On BitBucket
var user = 'sgnl' //enter your username here
if (!logged_in_at_bitbucket){
userLogin();
}
goTo.YourAccountSettings('https://bitbucket.org/account/' + user + '/');
$('a#SSH-Kets').click();
@sgnl
sgnl / server.js
Last active August 29, 2015 14:00
node-restify-usergrid
var usergrid = require('usergrid');
/* Usergrid */
var client = new usergrid.client({
orgName:'lupin',
appName:'sandbox',
logging: true, //optional - turn on logging, off by default
});
@sgnl
sgnl / gist:6f50f802e5c83695c5fb
Last active August 29, 2015 14:03
To-Do list using HTML, jQuery, and CSS.

To-Do list using HTML, jQuery, and CSS.

This exercises needs jQuery, it may be best to download jQuery and add it locally to the project as doing so allows you to work offline.

Tech:

Requirements:

@sgnl
sgnl / gist:e5c882318ce6627805de
Last active August 29, 2015 14:03
txtrc - A Basic Chat Room

Chat Room

Build a basic chat room. The purpose of this exercise is to practice getting user input and manipulating the DOM through javascript with jQuery.

Requirements:

  • Must have a form
    • this form must have at least 2 fields
      • an input field for username
      • a textarea field for the message to send to the chat room
  • this form must have a submit button
@sgnl
sgnl / gist:9553c13a5a7341f76685
Created November 7, 2014 07:41
Helpful CSS Pseudo Selectors
:first-child - https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child
:last-child - https://developer.mozilla.org/en-US/docs/Web/CSS/:last-child
:nth-child() - https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
30 Most Helpful CSS Selectors:
http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
Special Stuff:
@sgnl
sgnl / path.js
Created November 19, 2014 02:08
Scriptcraft - Blocks Follow
var utils = require('utils');
events.on("player.PlayerMoveEvent", function(evt) {
var playerLoc = utils.getPlayerPos(evt.player);
var drone = new Drone(playerLoc);
// console.log(playerLoc);
drone.box(blocks.wood, 1, 1, 1);
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var groceryStore = {

Red Green Blue

Exercise with Media Queries

Create a standard html5 setup linking an external stylesheet.

index.html
stylesheets/
 styles.css
@sgnl
sgnl / gist:79b05d5946019db13429
Last active August 29, 2015 14:17
Recursion
/**
* This function logs to the console each element in an Array of Strings.
* This function accepts an Array of Strings as an argument and returns nothing.
*
* printArray(['Such', 'Hawks', 'Such', 'Hounds']);
*
* Will display in the console as:
* Such
* Hawks
* Such