Skip to content

Instantly share code, notes, and snippets.

View jukbot's full-sized avatar
🏠
Working from home

Juk - a search builder jukbot

🏠
Working from home
  • CalCal
  • Bangkok, Thailand
  • X @jukbot
View GitHub Profile
@phamonyut
phamonyut / deploy.rb
Created October 19, 2015 10:48
example mina deploy.rb
# config/deploy.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
set :rbenv_path, '/usr/local/rbenv'
set :domain, '<your_ip>'
set :deploy_to, '<your_deploy_path>'
@phamonyut
phamonyut / default
Last active October 20, 2015 05:17
example ngnix
# /etc/nginx/sites-available/default
upstream symbolet {
server unix:/tmp/unicorn.<your_unicorn_sock>.sock fail_timeout=0;
}
server {
server_name symbolet.com www.symbolet.com;
listen 80;
@phamonyut
phamonyut / unicorn.rb
Created October 19, 2015 10:50
example unicorn script
# config/unicorn.rb
# Use at least one worker per core if you're on a dedicated server,
# more will usually help for _short_ waits on databases/caches.
worker_processes 4
# Since Unicorn is never exposed to outside clients, it does not need to
# run on the standard HTTP port (80), there is no reason to start Unicorn
# as root unless it's from system init scripts.
# If running the master process as root and the workers as an unprivileged
@edouard-lopez
edouard-lopez / slides.md
Last active January 15, 2018 22:38
IPFS: InterPlanetary File System presentation http://slides.com/edouard-lopez/ipfs
@judsonmitchell
judsonmitchell / crimbook-on-ipfs.png
Last active February 15, 2018 03:24
Publishing My App to IPFS
crimbook-on-ipfs.png
@scheglov
scheglov / flutter_outline_live_preview.dart
Last active April 7, 2018 21:49
Example of Flutter code to demonstrate Flutter Outline with preview.
import 'package:flutter/material.dart';
class MyWidget extends StatelessWidget {
final String firstText;
MyWidget(this.firstText);
factory MyWidget.forDesignTime() {
return new MyWidget('AA');
}
@sorensen
sorensen / example.js
Created February 12, 2013 15:25
Socket.io / Express sessions with keep alive and validation
/*!
* Dependencies
*/
var http = require('http')
, express = require('express')
, connect = require('connect')
, store = new connect.middleware.session.MemoryStore()
, app = express()
@bivainis
bivainis / sanfrancisco-font.css
Last active April 18, 2019 02:52
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2");
}
@acoshift
acoshift / main.go
Last active March 3, 2020 06:20
http1 vs h2c
package main
import (
"context"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
@Dabolus
Dabolus / Deploying PWA Starter Kit to Firebase.md
Last active June 26, 2020 01:39
A simple guide that explains how to deploy PWA Starter Kit to Firebase

Note: this guide explains step by step how to add Firebase to PWA Starter Kit.

If you already have some Firebase knowledge and you just want to get everything ready out of the box, you might want to checkout the Firebase branch on the PWA Starter Kit repo, that already contains all the needed files.

Deploying prpl-server to Firebase

Firebase Hosting alone is not sufficient for hosting the prpl-server build since it requires some server-side processing of the user agent string. Instead, you will have to use Firebase Functions for that.

  1. Sign up for a Firebase account