Skip to content

Instantly share code, notes, and snippets.

View alacritythief's full-sized avatar

Andy Wong alacritythief

View GitHub Profile
@ViskoB
ViskoB / GW2_TS3_Auth.sql
Last active November 7, 2015 19:27
GW2 TS3 Authentication - Table
CREATE TABLE IF NOT EXISTS `ts3auth` (
`ts3_uniqueid` varchar(250) NOT NULL,
`gw2_name` varchar(250) NOT NULL,
`gw2_refresh` varchar(250) NOT NULL,
`gw2_apikey` varchar(250) NOT NULL,
`gw2_world` int(11) NOT NULL,
`last_check` datetime NOT NULL,
`dbsessionhash` varchar(250) NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'oauth',
`keyname` varchar(250) NOT NULL DEFAULT '',
@HeroicEric
HeroicEric / enumerable_example_p1.md
Last active August 29, 2015 14:05
Enumerable Examples - Part 1

Enumerable Examples

[Enumerable][enumerable] is a mixin that is used to add additional functionality to collection classes like Array and Hash. This means that you can use the methods defined in Enumerable on both arrays and hashes.

#map

[Enumberable#map][map] is useful when you want to create a new array by iterating over some collection of values, and calculate a new value based on

@dbrgn
dbrgn / mixins.py
Last active September 13, 2018 20:44
Moved to https://github.com/dbrgn/drf-dynamic-fields
@hchood
hchood / basic_array_and_hash_drills.rb
Last active August 29, 2015 14:01
array and hash drills
############################
# Array & hash drills
############################
first_names = ["Richard", "Adam", "Sam", "Helen", "Eric"]
# Print each name in the array
# Downcase each name in the array
# Print the third name in the array
full_names = [
@hchood
hchood / return_value_drills2.rb
Last active August 29, 2015 14:01
return_value_drills2
# RUBY FUNDAMENTALS III: NON-CORE RETURN VALUE DRILLS
# ----------------------------
def is_a_fixnum?(some_input)
some_input.class == Fixnum
end
is_a_fixnum?(10)
is_a_fixnum?("10")
@planetoftheweb
planetoftheweb / insertyoutubefeed
Created April 12, 2012 14:18
Insert YouTube Channel Feed & Player into any site using JSON
<style>
#videogroup {
width: 100%;
}
iframe {
width: 90%;
padding: 5%;
}