Skip to content

Instantly share code, notes, and snippets.

View alhankeser's full-sized avatar

Alhan Keser alhankeser

View GitHub Profile
@alhankeser
alhankeser / find_interesting_stations.sql
Last active September 16, 2019 00:48
Find interesting Citi Bike stations
-- What are the stations in a variety of neighborhoods that have a lot of bikes, often run out and often get replenished?
with variability as (
select
borough,
hood,
station_name,
station_id,
max(available_bikes) as max_bikes,
sum(case when available_bikes = 0 then 1 else 0 end) as times_no_bikes,
sum(case when available_docks = 0 then 1 else 0 end) as times_replenished
@alhankeser
alhankeser / race.vue
Created September 14, 2019 16:40
Zwift Report live race view
<template>
<div class="container-fluid">
<navigation :race="race"/>
<transition name="fade">
<div v-if="loading" style="position:fixed" class="animated yt-loader"></div>
</transition>
<div class="row content">
<div class="race-header">
<div class="relative-start">
<span class="badge live-alert" style="font-style:normal;" v-if="isLive(race)">LIVE!</span>
@alhankeser
alhankeser / zwiftApiController.js
Last active September 11, 2019 03:50
Zwift API Wrapper (node.js)
var ZwiftConnection = require('zwift-mobile-api');
var zwiftAccount = new ZwiftConnection(process.env.ZWIFT_USERNAME, process.env.ZWIFT_PASSWORD);
var axios = require('axios');
var Q = require('q');
try {
var world = zwiftAccount.getWorld(1);
}
catch (err) {
res.sendStatus(500);
@alhankeser
alhankeser / gulpfile.js
Created April 11, 2016 23:13 — forked from laracasts/gulpfile.js
Example Laravel-specific Gulpfile from Laracasts.com
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
@alhankeser
alhankeser / toolswitcher.js
Last active February 6, 2016 01:26
Switch between no testing tool and something like Optimizely randomly and track it in GA
(function (global) {
// YOUR LIST OF TOOLS - REPLACE THE 'XXXXXXXXXX' WITH YOUR OPTIMIZELY PROJECT ID
var yourTools = [
{tool: "None" },
{
tool: "optimizely",
projectID: "XXXXXXXXXX"