This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('superagent'); | |
var React = require('react'); | |
// require('./app.scss'); | |
var API_ROOT = '/api/'; | |
var App = React.createClass({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.fullwidth { | |
width: 100vw; | |
margin-left: calc((100vw - $wrapper_width)/-2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#article-content h1 { | |
float: left; | |
margin-right: 1rem; | |
} | |
#article-content h2 { | |
color: #666; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var fs = require('fs'); | |
var argv = require('yargs').argv; | |
var cheerio = require('cheerio'); | |
var DEFAULT_TEMPLATE = "http://uclabruins.com/ViewArticle.dbml?ATCLID=209624560&DB_OEM_ID=30500"; | |
var template = argv.template || DEFAULT_TEMPLATE; | |
var pageFilename = argv._[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
API_URL="http://freegeoip.net/csv/" | |
# Get current external IP (http://askubuntu.com/a/95911) | |
IP=$(curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//') | |
LOCATION=$(curl -s ${API_URL}${IP}) | |
echo "$LOCATION" | awk -F "," '{print $6 ",", $5 ",", $3}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; <<>> DiG 9.8.3-P1 <<>> dailybruin.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9189 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;dailybruin.com. IN A | |
;; AUTHORITY SECTION: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link href="favicon.ico" rel="icon" type="image/x-icon" /> | |
<title>Thoughtpad</title> | |
<meta name="description" content="Page description, shows up in search results. Should be no longer than 150-160 characters." /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// get a reference to the current script (IE support) | |
// http://stackoverflow.com/a/22745553 | |
const scripts = document.getElementsByTagName('script'); | |
const currentScript = scripts[ scripts.length - 1 ]; | |
const CONTEXT_URL = currentScript.dataset.context; | |
const TEMPLATE_URL = currentScript.dataset.template; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// click the "more members" button programatically to get everyone who likes dank memes | |
window.setInterval(() => { document.querySelector('.uiMorePagerPrimary').click() }, 5000); | |
// get the names of everyone who likes dank memes | |
let people = Array | |
.from(document.querySelectorAll('.fsl.fwb.fcb')) | |
.map(a => { return a.innerText }); | |
// get the 100x100 profile photo URLs of everyone who likes dank memes | |
let photos = Array |