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
  • Opsta
  • 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;
@bivainis
bivainis / sanfrancisco-font.css
Last active May 26, 2024 20:01
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");
}
@judsonmitchell
judsonmitchell / crimbook-on-ipfs.png
Last active February 15, 2018 03:24
Publishing My App to IPFS
crimbook-on-ipfs.png
@ralavay
ralavay / vim-nginx-conf-highlight.sh
Last active November 5, 2024 02:16
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
@SeanZoR
SeanZoR / detectWebGL.js
Created August 20, 2015 12:48
Detect WebGL with JS in browser
/**
* Detects if WebGL is enabled.
* Inspired from http://www.browserleaks.com/webgl#howto-detect-webgl
*
* @return { number } -1 for not Supported,
* 0 for disabled
* 1 for enabled
*/
function detectWebGL()
{
@brianberlin
brianberlin / AWS Cognito + Facebook Login JavaScript Example
Created July 29, 2015 17:14
AWS Cognito + Facebook Login JavaScript Example
<!DOCTYPE html>
<html>
<head>
<title>AWS Cognito + Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
</head>
<body>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.41.min.js"></script>
<script>
@dcollien
dcollien / ImageTools.es6
Last active April 28, 2023 09:00
Resize Images in the Browser
let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () {
try {
return Boolean(new Blob());
} catch (e) {
return false;
}
}());
let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () {
try {
@v0lkan
v0lkan / nginx.conf
Last active April 15, 2025 11:53
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx