CoreOS can seem daunting at first. This tutorial is built to encourage you in your journey and to demonstrate the power of this minimalistic operating system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ibnesayeed/faye | |
var http = require('http'), | |
faye = require('faye'), | |
port = Number(process.env.PORT) || 9292, | |
timeout = Number(process.env.TIMEOUT) || 45, | |
mount = process.env.MOUNT || '/faye'; | |
var server = http.createServer(), | |
bayeux = new faye.NodeAdapter({mount: mount, timeout: timeout}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/cloudflare.conf | |
# If using Cloudflare, uncomment the following to get proper originating IPs | |
#set_real_ip_from 204.93.240.0/24; | |
#set_real_ip_from 204.93.177.0/24; | |
#set_real_ip_from 199.27.128.0/21; | |
#set_real_ip_from 173.245.48.0/20; | |
#set_real_ip_from 103.22.200.0/22; | |
#set_real_ip_from 141.101.64.0/18; | |
#real_ip_header CF-Connecting-IP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install openssl | |
brew link --force openssl | |
gem install puma | |
ALternatively: | |
export CPPFLAGS="-I/usr/local/opt/openssl/include" | |
export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
gem install puma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
### mysql general option | |
bind-address = 0.0.0.0 | |
user = mysql | |
pid-file = /var/run/mysqld/mysqld.pid | |
socket = /var/run/mysqld/mysqld.sock | |
port = 3306 | |
basedir = /usr | |
datadir = /var/lib/mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_session = Proc.new do |out, target, _pry_| | |
(Dir["**/lib/**/*.rb"]+Dir["**/spec/**/*.rb"]).each do |path| | |
$: << path unless !File.exist?(path) || $:.include?(path) | |
end | |
end | |
Pry.config.hooks.add_hook(:before_session, before_session) do | |
puts "Welcome to primes debug session" | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function number_page_avoid_cover() { | |
var vars={}; | |
var x=document.location.search.substring(1).split('&'); | |
for(var i in x) { | |
var z=x[i].split('=',2); | |
if (z[0] =='page' && z[1]==1) { | |
vars[z[0]] = 0 | |
} else { | |
vars[z[0]] = unescape(z[1]-1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// rewrite /wp-content/themes/theme-name/css/ to /css/ | |
// rewrite /wp-content/themes/theme-name/js/ to /js/ | |
// rewrite /wp-content/themes/theme-name/img/ to /img/ | |
// rewrite /wp-content/plugins/ to /plugins/ | |
function roots_flush_rewrites() { | |
global $wp_rewrite; | |
$wp_rewrite->flush_rules(); | |
} |
by alexander white ©