Skip to content

Instantly share code, notes, and snippets.

View jpalala's full-sized avatar
🔭
Lets build something useful

Joe Palala jpalala

🔭
Lets build something useful
View GitHub Profile
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
@jpalala
jpalala / install-node-redis.sh
Created January 25, 2018 07:46 — forked from nilakanta/install-node-redis.sh
Install Node.js & Redis on ubuntu
# Install git
sudo apt-get install git-core
# Install Node.js
sudo apt-get install -y libssl-dev pkg-config build-essential curl gcc g++ checkinstall
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
@jpalala
jpalala / event-loop.md
Created January 25, 2018 07:26 — forked from jesstelford/event-loop.md
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@jpalala
jpalala / index.html
Created December 13, 2017 15:24 — forked from anonymous/index.html
Justified container into center like in twitter
<div id="app">
<v-toolbar class="green">
<v-toolbar-title>Example vuetify template</v-toolbar-title>
</v-toolbar>
<v-app>
<v-content>
<v-container fluid grid-list-xl>
<v-layout row justify-center>
@jpalala
jpalala / laravel-subdirectory.conf
Created December 8, 2017 09:28 — forked from tsolar/laravel-subdirectory.conf
Laravel in subdirectory nginx example
server {
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 300M;
sendfile on;
send_timeout 300s;
# Port that the web server will listen on.
#listen 80;
@jpalala
jpalala / osx_setup.md
Created November 4, 2017 03:12 — forked from mcls/osx_setup.md
Setup mac for ruby dev
@jpalala
jpalala / Generated Javascript file
Created October 16, 2017 06:36 — forked from bertt/Generated Javascript file
TypeScript and JQuery sample
var Person = (function () {
function Person(name) {
this.name = name;
}
return Person;
})();
function greeter(person) {
return "hallo " + person.name;
}
var person = new Person("bert");
@jpalala
jpalala / wp.sh
Created October 11, 2017 07:00 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@jpalala
jpalala / gist:67239a5a9dff20fcbeb2a80f7c24cc36
Created August 20, 2017 03:56 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>