Skip to content

Instantly share code, notes, and snippets.

View rivaadara111's full-sized avatar

Riva's student github rivaadara111

  • Vancouver, BC, Canada
View GitHub Profile
@rivaadara111
rivaadara111 / 0_reuse_code.js
Created January 26, 2016 21:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rivaadara111
rivaadara111 / Flexbox corners.css
Created January 26, 2016 21:37
Using Flexbox to get divs in 4 corners
/**
* Base styles to get us started...
*/
.container {
background-color: black;
box-sizing: border-box;
text-align: center;
}
.item {
@rivaadara111
rivaadara111 / javascript basics examples.js
Created January 28, 2016 18:39
javascript basics examples
// expressions----------------------->
var mathResult = 1*10 + (200 / 3);
// an expression uses operators to give you a return value
//statement
if(false === true){
console.log('WTF');
}
else{
//SORTS ITEMS USING ANIMATION LIBRARY
$(window).load(function() {
var box = $('.box'),
boxContainer = $('.boxes'),
section = $('.sort-section'),
containerHeight = $('.adjustable-height'),
boxClassFilter,
showThese;
(function($, window, document) {
function toggleMenus() {
$('.reveal_js--trigger[data-target="drop1"][data-action="toggle"]').on('click', function(e) {
var clicked_obj = $(this),
target = clicked_obj.data('target'),
target_obj = $('.reveal_js--content[data-content="' + target + '"]'),
header_obj = $('#header'),
(function($) {
// object constructor that creates itself and inserts itself onto the page
function Subscribe(whereIam) {
var self = this;
this.create_box = function(){
self.letterBlock = document.createElement('div');
self.letterBlock.setAttribute("id", "box--social");
self.letterBlock.className += 'box box--social sans-pro';
//a simple script to convert a csv to xml
<?php
$csvfile = 'DispensariesNEW.csv';
$xmlfile = 'dispensariesoutput.xml';
// Open csv to read as array
$csv = array_map('str_getcsv', file($csvfile));
array_walk($csv, function(&$a) use ($csv) {
//using gmaps api to display locations with custom markers around vancouver
(function($) {
var marker_data;
$(document).ready(function() {
var jqxhr = $.get(document.getElementById('special-issues--map-canvas').getAttribute('data-src'), {}, function(data) {
marker_data = data;
}, 'text')
.error(function(jqXHR, textStatus, errorThrown) {
}).done(function() {
function gs_ads_menu() {
$items = array();
$items['admin/bookings/takeovers'] = array(
'type' => MENU_CALLBACK,
'description' => 'A form for booking ad takeovers.',
'page callback' => 'gs_ads_custom_page_display',
'access callback' => 'user_access',
'access arguments' => array('eck add booking takeover entities'),
'file' => 'includes/gs_ads.form.inc'