Skip to content

Instantly share code, notes, and snippets.

View sxlijin's full-sized avatar
🎯
doing things

Samuel Lijin sxlijin

🎯
doing things
View GitHub Profile
@sxlijin
sxlijin / scrape-voice-survey-data.bash
Created December 7, 2016 09:10
Scrapes the VOICE survey data submitted by students.
#!/usr/bin/bash
VUNETID="put your vunetid here"
VUNETPW="put your vunetid password here"
# login
curl https://www.sds.vanderbilt.edu/perl/voiceview.pl \
-X POST \
-d VSASM_ASVBlock=425457605464733D246C743F77706A6466776A66782F716D3D2477743F425457604E6675693D246C743F4D4D4542513D2477743F42545760516275693D246C743F7878782F7465742F77626F656673636A6D752F666576307166736D3077706A6466776A66782F716D3D2477743F425457605476634E6675693D246C743F45464742564D553D2477743F42545760544A513D246C743F31423533453132473D2477743F425457604271713D246C743F57504A44463D2477743F425457605477733D246C743F54455432 \
-d VSASM_user="${VUNETID}" \
@sxlijin
sxlijin / .travis.yml
Last active October 24, 2016 21:40
Example .travis.yml for CS3251
language: cpp
sudo: false
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
@sxlijin
sxlijin / CMakeLists.txt
Last active October 14, 2016 21:36
Example CMakeLists.txt for CS3251 Assignment3a
cmake_minimum_required(VERSION 3.2)
project(3a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
set(SOURCE_FILES
main.cpp)
add_executable(3a ${SOURCE_FILES})
@sxlijin
sxlijin / protect_branches_with_gh_api.py
Created October 1, 2016 22:34
Demo of how to access the protected branches API (currently in preview) with Python.
#!/usr/bin/env python
"""
Demo of how to access the protected branches API, currently in preview.
See https://developer.github.com/changes/2016-06-27-protected-branches-api-update/
Note that you get a 404 if you attempt to get the protection of a branch on a
repo that your token actually works for (it's not well-defined behavior, but
it's what happens).
Note that for this to work on non-unix systems, AUTH_TOKEN must be set.
"""