Skip to content

Instantly share code, notes, and snippets.

View nickisnoble's full-sized avatar
🔬
Work smarter, not harder

Nick Noble nickisnoble

🔬
Work smarter, not harder
View GitHub Profile
@nickisnoble
nickisnoble / google-calendar-read-js.html
Created July 31, 2021 04:10 — forked from marchawkins/google-calendar-read-js
How to connect to the Google Calendar API via the Javascript Client Library to retrieve calendar events. The demo also employs Oauth2 authentication, so the script could read a logged in user's calendar. This demo **only** reads a public calendar. You need the calendar's id (from google) in your own code to retrieve any events. For more info, vi…
<div class="row">
<div class="col-md-2 col-sm-2 col-xs-12">
<button id="authorize-button" style="visibility: hidden" class="btn btn-primary">Authorize</button>
</div><!-- .col -->
<div class="col-md-10 col-sm-10 col-xs-12">
<script type="text/javascript">
// date functions
Date.prototype.getWeek = function(start) {
start = start || 0;
@nickisnoble
nickisnoble / resume.json
Last active March 1, 2021 19:06
Resume
{
"basics": {
"name": "Nick Noble",
"label": "Designer",
"email": "nick.noble@hey.com",
"phone": "(410) 608-9787",
"website": "http://nicknoble.works",
"summary": "Multifaceted generalist with a passion for making things that work, whether it's design, code, product, process, or people — Nick is ready to iterate.",
"location": {
"city": "Brooklyn",
@nickisnoble
nickisnoble / hash.c
Last active January 29, 2020 03:14
Hashing function in c
#include <stdio.h>
#include <string.h>
// Hashes word to a number
unsigned int hash(const char *word)
{
// "pneumonoultramicroscopicsilicovolcanoconiosis"
// Another thought,
// Coverting to binary, adding up all the 1s (ignoring place) gives us 207
// If all ones, it would be 360
@nickisnoble
nickisnoble / update-ghost.sh
Created August 4, 2017 14:57
A quick script to update a self hosted Ghost installation (must have root access)
# update server software
apt-get update
# go to web root
cd /var/www/
# Remove any previous zips
rm ghost*.zip
# download the latest version of ghost
@nickisnoble
nickisnoble / base.scss
Last active December 15, 2016 17:43
Fluid column, static gutter SCSS Grid Generator with offset, push, & pull
$unit: 24px;
* {
&,
&:before,
&:after {
box-sizing: border-box;
}
& + & {
margin-top: $unit;
alias bex="bundle exec"
# Git aliases
alias gs="git status"
alias glc="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias glt="git log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
alias ga="git add"
alias gc="git commit -m"
alias gam="git commit -am"
@nickisnoble
nickisnoble / Codepen validation regex
Last active August 29, 2015 14:09
Matches Codepen user profiles, blogs, blog entries, and most pens.
/^(https?:\/\/)?((w{3}\.)?)codepen\.io\/[a-z0-9_\-]+(\/(pen|blog|full|debug|details|pres|live|professor|collab))?(\/([a-z0-9_\-]+)(\?editors\=[0-9]+)?)?\/?$/