Skip to content

Instantly share code, notes, and snippets.

View bindzus's full-sized avatar

Thomas Bindzus bindzus

View GitHub Profile
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
# This file corresponds to a single Sidekiq process. Add multiple copies
@bindzus
bindzus / default
Created April 26, 2018 04:49 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@bindzus
bindzus / nginx.conf
Created August 28, 2017 07:33 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@bindzus
bindzus / clean-up-boot-partition-ubuntu.md
Created August 25, 2017 17:11 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@bindzus
bindzus / install.sh
Last active June 5, 2017 19:06 — forked from ziadoz/install.sh
Install 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
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Remove existing downloads and binaries so we can start from scratch.
rm ~/google-chrome-stable_current_amd64.deb
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
var printMap = function(map) {
map.setOptions({
mapTypeControl: false,
zoomControl: false,
streetViewControl: false,
panControl: false
});
var popUpAndPrint = function() {
dataUrl = [];
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
@bindzus
bindzus / Terminal output
Created July 2, 2013 07:50
Terminal output during Locomotive CMS upgrade (as described here: http://doc.locomotivecms.com/releases/upgrading-engine)
> bundle exec rake db:mongoid:migration:install locomotive/femklik (locomotive ⚡) Thomass-MacBook-Air
[RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
Copied migration 20130204072721_make_editable_elements_consistent.rb from locomotive
Copied migration 20130326201349_rename_entry_to_content_entry.rb from locomotive
Copied migration 20130511121956_generate_checksum_for_theme_assets.rb from locomotive
Copied migration 20130530162559_api_key_for_all_accounts.rb from locomotive
Copied migration 20130621135025_create_editable_texts.rb from locomotive
Copied migration 20130627101548_localize_slugs_of_content_entries.rb from locomotive
> bundle exec rake db:mongoid:migrate locomotive/femklik (loc
<!-- File: app/views/layouts/application.html.erb -->
<%= yield %>