Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
DOMAIN="p2p.earth"
EMAIL="[email protected]"
echo ""
echo "Starting proxy and ssl companion."
echo ""
docker run -d -p 80:80 -p 443:443 \
@ziadoz
ziadoz / install.sh
Last active February 8, 2025 16:04
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@muhammadghazali
muhammadghazali / What is server_names_hash_bucket_size.md
Last active March 11, 2025 03:56
Nginx: What is server_names_hash_bucket_size?

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@mwolson
mwolson / updating-man-database.md
Created October 21, 2016 01:30
Updating man database (for man -k) on OS X

After installing new packages, the M-x man command might not list the new manpages for those packages, because the whatis DB used by man gets updated weekly via a cron job. Further, any manpages for programs that are part of the XCode Commandline Tools will never get installed because the cron job inexplicably excludes them. To make force them to be generated, run the following:

sudo /etc/periodic/weekly/320.whatis
sudo /usr/libexec/makewhatis /Applications/Xcode.app/Contents/Developer/usr/share/man
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
server {
listen 80;
server_name yournamehere.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name yournamehere.com;
@mdang
mdang / RAILS_CHEATSHEET.md
Last active March 31, 2025 22:13
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@mamantoha
mamantoha / experience.rb
Last active April 13, 2025 08:50
Rails API Filtering and Sorting
# app/models/experience.rb
#
# == Schema Information
#
# Table name: experiences
#
# id :integer not null, primary key
# title :string
# description :text
# created_at :datetime not null
@netsensei
netsensei / index.js
Last active June 7, 2021 17:08
Using the Promise library + Fast-CSV to read/write CSV files
var promiseCSV = require('promiseCSV.js');
var path = "in.csv";
var options = { 'headers': true };
promiseCSV(path, options).then(function (records) {
// do other stuff
});
@sandervm
sandervm / commandline.txt
Last active March 5, 2025 14:49
Generate Django secret key commandline
$ python -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'