Skip to content

Instantly share code, notes, and snippets.


Roger Stringer freekrai

View GitHub Profile
freekrai / notion2blog.js
Created Sep 16, 2020 — forked from mayneyao/notion2blog.js > Personal Blog | custom domain + disqus comment
View notion2blog.js
const MY_DOMAIN = ""
const START_PAGE = ""
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
freekrai /
Created May 14, 2020 — forked from seankross/
Install latest ffmpeg on ubuntu 12.04 or 14.04
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
freekrai / NextValetDriver.php
Created Feb 23, 2019 — forked from james2doyle/NextValetDriver.php
A Laravel Valet driver for running generated Next.js sites. This driver assumes you have not changed the default public path (/out) in the next.config.js
View NextValetDriver.php
* NextValetDriver for running compiled next.js sites
class NextValetDriver extends BasicValetDriver
* Determine if the driver serves the request.
View ApplePushNotification.php
This is part of the Reprise framework, not yet released publicly.
Copyright 2013 Marco Arment. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

Build the application

go build -o queued *.go

Run the application

Now, to run our application, how about we start it with 2048 workers, just for kicks?

freekrai / Tab.css
Last active Feb 22, 2018 — forked from diegocasmo/Tab.js
Source code for implementing a React <Tabs/> component.
View Tab.css
ul.tabs-nav.nav.navbar-nav.navbar-left {
margin: 0px;
padding: 0px;
list-style: none;
} {
display: inline-block;
padding: 10px;
margin-right: 5px;
freekrai / Procfile
Created Feb 16, 2018 — forked from jordansissel/Procfile
Jenkins on Heroku
View Procfile
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1


When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
freekrai / 1.js
Last active Aug 11, 2017
View 1.js
var string = "Alphabet";
function firstNonRepeatedCharacter(string) {
var string = string.toLowerCase();
for (var i = 0; i < string.length; i++) {
var c = string.charAt(i);
if (string.indexOf(c) == i && string.indexOf(c, i + 1) == -1) {
return c;
freekrai / gist:636a92008f3099c4bb4399677082eb8f
Created Jun 25, 2017 — forked from pnommensen/gist:707b5519766ba45366dd
Ghost CMS with NGINX for Maximum Performance
View gist:636a92008f3099c4bb4399677082eb8f

Full blog post can be found here:

Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.

"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.

— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//" charset="utf-8"></script>

The node.js application runs on a port on your server