Skip to content

Instantly share code, notes, and snippets.

View spencerbeggs's full-sized avatar

C. Spencer Beggs spencerbeggs

View GitHub Profile
@spencerbeggs
spencerbeggs / demo.js
Created December 7, 2020 21:49
Code Embed Demo
export const greeting = (name) => {
return `hello, ${name}!`;
}
@spencerbeggs
spencerbeggs / keybase.md
Created August 18, 2020 22:49
keybase.md

Keybase proof

I hereby claim:

  • I am spencerbeggs on github.
  • I am spencerbeggs (https://keybase.io/spencerbeggs) on keybase.
  • I have a public key ASCNQ3-ZdGIQfztx5tBQWGFM8jEBZWF2ujgww0Ybh11zYwo

To claim this, I am signing this object:

@spencerbeggs
spencerbeggs / settigns.xml
Created October 8, 2018 19:59
Charles Settingss
<?xml version='1.0' encoding='UTF-8' ?>
<?charles serialisation-version='2.0' ?>
<charles-export>
<proxyConfiguration>
<enableSOCKSProxy>false</enableSOCKSProxy>
<dynamicHTTPPort>false</dynamicHTTPPort>
<dynamicSOCKSPort>false</dynamicSOCKSPort>
<enableSOCKSTransparentHTTPProxying>true</enableSOCKSTransparentHTTPProxying>
<port>7777</port>
<SOCKSPort>8889</SOCKSPort>

Below is a walkthrough of that gets a developer working on a Mac a useable local environment.

Install Xcode

If you are using a Mac, you should first install Xcode from the App Store. Once it is installed, open it, accept the EULA. Next you can install Xcode Commandline Developer Tools:

xcode-select --install

If you aren't on a Mac, just make sure you have a gcc compiler available on your system.

@font-face {
font-family: "I Made Up This Name";
src: url(https://fonts.gstatic.com/s/librefranklin/v1/PFwjf3aDdAQPvNKUrT3U7zi6aZXXSmqDXSFqcYJu3PE.ttf) format("truetype");
unicode-range: U+30-39;
}
body {
font-family: "I Made Up This Name", arial, san-serif;
}
@spencerbeggs
spencerbeggs / a.js
Created August 9, 2017 19:10
Modules
import { myObject } from "./module.js";
// myObject is the SAME object you created on line 1 of module.js
// if you change the value of foo, it will change everywhere you imported it
@spencerbeggs
spencerbeggs / bar.js
Last active May 2, 2017 17:06
Module Export demo
export function bar() {
console.log("bar");
}
export function bar2() {
console.log("bar2");
}
@spencerbeggs
spencerbeggs / setup.html
Created March 20, 2017 18:25
Facebook Instant RSS
<figure class="op-tracker">
<iframe hidden>
<script>
PARSELY = {
autotrack: false,
onload: function() {
PARSELY.beacon.trackPageView({
urlref: 'http://facebook.com/instantarticles'
});
return true;
@spencerbeggs
spencerbeggs / scrape.js
Created March 10, 2017 23:00
Parse Indexes
let files = fetch(urlToFolder).then(res => {
if (res.status === 200) {
return res.text();
}
}).then(body => {
return urls = parseBody(body);
}).then(urls => {
return map.urls(url => fetch(url));
});
@spencerbeggs
spencerbeggs / load.js
Created March 10, 2017 22:43
Load Files in JS
var fs = require("fs");
var path = require("path");
function loadFile(filePath) {
return new Promise((resolve, reject) => {
console.log(filePath);
fs.readFile(filePath, {
encoding: "utf-8"
}, (err, data) => {
if (err) {