Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile

Ruby 2.0.0 in detail

Keyword arguments

def wrap(string, before: "<", after: ">")
  "#{before}#{string}#{after}" # no need to retrieve options from a hash
end

# optional
  • Install AusKey software
  • Show file contents of /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  • Move .JAR files from /Library/Java/Extensions to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/ext

UPDATE 16/11/2013: AusKey no longer requires software to be installed on Mac OS X so these steps are no longer necessary

[Congressional Bills 113th Congress]
[From the U.S. Government Printing Office]
[H.R. 3361 Reported in House (RH)]
Union Calendar No. 334
113th CONGRESS
2d Session
H. R. 3361
[Report No. 113-452, Parts I and II]
@Teino1978-Corp
Teino1978-Corp / R_codes_bond_kaggle.R
Created December 1, 2015 06:36
So far what I got with dealing with the NA's
############################################################################################
####################### READING THE RELEVANT FILES #########################################
train.data <- read.csv("train_sample.csv")
## Set seed for reproducing the random numbers
set.seed(10001)
## This is to confirm the selection of trade_price_last{1-10}
@Teino1978-Corp
Teino1978-Corp / server_config.md
Created November 30, 2015 05:12
Basic server config.

Server config

This is a collection of condensed, edited articles to aid in setting up a new server. Credits are at the bottom of this document.

Initial server setup

1. Login

Login as the main user:

@Teino1978-Corp
Teino1978-Corp / gist:00f2f4a27b97d0eeb3d4
Created November 29, 2015 22:15
Git Log of backbone.js
Commits in HEAD
7bfce6fe * origin/master origin/HEAD master Merge pull request #1658 from braddunbar/history-window
|\
a4243413 | * Fix #1653 - Ensure that `History` can be used outside of the browser.
|/
da18e002 * Merge branch 'master' of github.com:documentcloud/backbone
|\
161c3a21 | * Merge pull request #1656 from braddunbar/sortby-groupby - http://gitelephant.cypresslab.net/backbone-js/commit/161c3a21d7c3d43445478cee8f64f6ddb996822e
| |\
c344201f | | * Fix #1655 - sortBy & groupBy use attributes.
#!/bin/sh
# only deploy when on the master
# add this file to .git/hooks in your repo
# add your preferred cloud storage account
dest="Dropbox"
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "master" == "$branch" ]; then
echo "Deploying to $dest"
########################
# sails
########################
.sails
.waterline
.rigging
.tmp
########################
@Teino1978-Corp
Teino1978-Corp / SelectReferencesUtils.cs
Created November 27, 2015 01:13
Utility script for selecting the reference on the scene by the selected project assets in Unity. - [Technic result: https://www.pinterest.com/pin/207376757813918108/]
using System;
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using UnityObject = UnityEngine.Object;
public static class SelectReferencesUtils {
[MenuItem("Assets/Select Intances On Scene", false, 30)]
static void SelectInstances() {
Selection.objects = GetReferencesOfAsset(Selection.objects);
@Teino1978-Corp
Teino1978-Corp / git-graph.rb
Created November 27, 2015 01:04
A GUID (globally unique identifier) is a bigger, badder version of this type of ID number. You may see the term UUID tossed about (universally unique identifier), a nitpicky word for those whose numbers are unique not only within the globe, but throughout the entire universe. - http://guid.us/GUID/PHP
PHP
Its easy to make GUIDs in PHP. Below is clean code using windows COM to get GUIDs. When the PHP creates GUIDs or UUIDs they are V4 guids.
$guid = com_create_guid();
echo $guid;
If you are not a on windows based platform you can roll this code for making GUIDs in PHP:
function getGUID(){