Skip to content

Instantly share code, notes, and snippets.

@jasonroot
jasonroot / bitbucket-pipeline.yml
Created November 7, 2019 16:55
Bitbucket Pipeline config for static sites
# This is a build configuration for JavaScript.
# -----
image: node:10.15.3
pipelines:
branches:
release/*:
- step:
name: build
caches:
@jasonroot
jasonroot / main.sh
Created August 7, 2019 19:51
Change permissions to 644 for all assets in current folder.
find -type f -exec chmod 644 {} \;
@jasonroot
jasonroot / main.js
Last active June 24, 2019 19:54
dynamic timestamp
©
<script>
new Date().getFullYear()>2010&&document.write(+new Date().getFullYear());
</script>
&nbsp;Company
@jasonroot
jasonroot / main.scss
Last active July 8, 2019 16:16
font scaling
/// fonts
html,
body {
font-size: 14px !important;
}
h1 {
font-size: 1.602em;
}
h2 {
font-size: 1.424em;
@jasonroot
jasonroot / main.js
Last active November 12, 2019 23:42
Instagram embed
var request = new XMLHttpRequest();
request.open('GET', 'https://api.instagram.com/v1/users/self/media/recent/?access_token={% TOKEN %}&count=8', true);
request.onload = function(container) {
if (request.status >= 200 && request.status < 400) {
// Success!
var data = JSON.parse(request.responseText);
for (var i=0;i < data.data.length;i++) {
var container = document.getElementById('instagram-feed');
var imgURL = data.data[i].images.low_resolution.url;

Keybase proof

I hereby claim:

  • I am jasonroot on github.
  • I am jasonroot (https://keybase.io/jasonroot) on keybase.
  • I have a public key whose fingerprint is 56F3 E39B 065C 657A 80F7 5BD4 016C 7948 9CB6 5B91

To claim this, I am signing this object: