Skip to content

Instantly share code, notes, and snippets.

View jpalala's full-sized avatar
🎯
Focusing

Joe Palala jpalala

🎯
Focusing
View GitHub Profile
@jpalala
jpalala / console.php
Created July 23, 2018 15:43 — forked from meigwilym/console.php
Laravel Create User Command
<?php
// routes/console.php
// quickly create an user via the command line
Artisan::command('user:create', function () {
$name = $this->ask('Name?');
$email = $this->ask('Email?');
$pwd = $this->ask('Password?');
// $pwd = $this->secret('Password?'); // or use secret() to hide the password being inputted
\DB::table('users')->insert([
<?php
class CalendarEvent {
/**
*
* The event ID
* @var string
*/
private $uid;
@jpalala
jpalala / angular_data.html
Created June 18, 2018 09:20 — forked from MrSaints/angular_data.html
A simple AngularJS application to add / delete / list / sort data comprising of three fields (state code, price and tax). It was written to demonstrate to a friend, the simplicity and power of Angular to address programming challenges - in recruitment processes - quickly and effectively.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Add / List Data (AngularJS)</title>
<style>
.list_data { margin-bottom: 2rem }
table, th, td { border: 1px solid #AAA }
th { cursor: pointer }
</style>
</head>
@jpalala
jpalala / Install HTTPie.md
Created May 15, 2018 00:35 — forked from BlakeGardner/Install HTTPie.md
Install HTTPie Mac OS X

This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.

HTTPie

The easy way

brew install httpie
@jpalala
jpalala / frontendDevlopmentBookmarks.md
Created April 21, 2018 14:15 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@jpalala
jpalala / .env.travis
Created April 7, 2018 07:09 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@jpalala
jpalala / nginx.conf
Created February 25, 2018 15:51 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jpalala
jpalala / Bibliography.bib
Created February 25, 2018 14:50 — forked from peterk87/Bibliography.bib
bibtex: Massive bibliography used in MSc thesis
@article{olson_limited_2007,
title = {Limited genetic diversity in \emph{{Salmonella enterica}} Serovar {Enteritidis} {PT13}},
volume = {7},
copyright = {2007 Olson et al; licensee {BioMed} Central Ltd.},
issn = {1471-2180},
url = {http://www.biomedcentral.com/1471-2180/7/87/abstract},
doi = {10.1186/1471-2180-7-87},
abstract = {Salmonella enterica serovar Enteritidis has emerged as a significant foodborne pathogen throughout the world and is commonly characterized by phage typing. In Canada phage types ({PT)} 4, 8 and 13 predominate and in 2005 a large foodborne {PT13} outbreak occurred in the province of Ontario. The ability to link strains during this outbreak was difficult due to the apparent clonality of {PT13} isolates in Canada, as there was a single dominant pulsed-field gel electrophoresis ({PFGE)} profile amongst epidemiologically linked human and food isolates as well as concurrent sporadic strains. The aim of this study was to perform comparative genomic hybridization ({CGH)}, {DNA} sequen
- 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