Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Huned Botee huned

I may be slow to respond.
View GitHub Profile
huned /
Created Feb 18, 2021 — forked from diniremix/
elementaryOS post install
# elementary OS Juno post install
# first step, upgrade
sudo apt update && sudo apt upgrade
sudo apt install ubuntu-restricted-extras
sudo apt install software-properties-common --no-install-recommends
sudo apt install libavcodec-extra ffmpeg
sudo apt install firefox vlc
sudo apt install screenfetch flameshot
huned /
Last active May 5, 2020 — forked from jamtur01/
[PROPOSAL] ZeroCater Engineering Ladder
View Capistrano tasks for starting unicorn.rb
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
task :stop, :roles => :app, :except => { :no_release => true } do
huned /
Created Mar 15, 2012
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git:// /usr/local/rbenv
# Add rbenv to the path:

Using rails_admin without devise

Having a buckload of code to authorize users on your application is something you may like or not. Speaking for myself I hate it. But I still love rails_admin, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.

Add RailsAdmin to your Gemfile

do NOT add devise

gem "rails_admin", :git => "git://"

View gist:664981
<VirtualHost *:80>
DocumentRoot "/home/example/apps/example_app/current/public"
<Directory "/home/example/apps/example_app/current/public">
Options -Indexes +FollowSymLinks -MultiViews -Includes
AllowOverride None
View jqcon notes
steve souders
9%/91% backend / frontend
site speed => google page rank
google webmaster tools, yslow, page speed
video, screenshot timeline
overwrite document.write
html5 iframe
increase browser disk cache
progressive rendering
View pretty buttons.sass
:-webkit-border-radius = !width
:-moz-border-radius = !width
=shadow(!alpha=0.2, !x=0px, !y=1px, !radius=5px)
:-webkit-box-shadow rgba(0, 0, 0, #{!alpha}) #{!x} #{!y} #{!radius}
:-moz-box-shadow rgba(0, 0, 0, #{!alpha}) #{!x} #{!y} #{!radius}
=background_gradient(!from, !to)
:background-color = !from
View uptime.rb
#!/usr/bin/env ruby
# calculate average uptime of my machine
require 'rubygems'
require 'activesupport'
times = `last | grep ^shutdown`
times = { |l| Time.parse l[/shutdown\s+~\s+(.*)/, 1] }
times = { |t| t > ? t - 1.year : t }
diffs =[1 .. -1]).map { |(a, b)| a - b if b }.compact