Skip to content

Instantly share code, notes, and snippets.

View figassis's full-sized avatar

Assis Ngolo figassis

View GitHub Profile
@figassis
figassis / lista-de-nacionalidade.txt
Created July 31, 2019 08:23 — forked from lpirola/lista-de-nacionalidade.txt
Lista de países em português com suas respectivas nacionalidades
Antígua e Barbuda - Antiguano
Argentina - Argentino
Bahamas - Bahamense
Barbados - Barbadiano, barbadense
Belize - Belizenho
Bolívia - Boliviano
Brasil - Brasileiro
Chile - Chileno
Colômbia - Colombiano
Costa Rica - Costarriquenho
@figassis
figassis / gencerts.sh
Created June 16, 2019 07:42
mysql ssl certs
DIR=`pwd`/openssl
PRIV=$DIR/private
mkdir $DIR $PRIV $DIR/newcerts
cp /usr/share/ssl/openssl.cnf $DIR
replace ./demoCA $DIR -- $DIR/openssl.cnf
# Create necessary files: $database, $serial and $new_certs_dir
# directory (optional)
@figassis
figassis / mon-a.log
Last active June 11, 2019 09:43
Rook Ceph Logs
$ kubectl logs -f rook-ceph-mon-a-74cc6db5c8-8s5l5
debug 2019-06-11 08:55:18.934 7fafa9547180 0 ceph version 14.2.1 (d555a9489eb35f84f2e1ef49b77e19da9d113972) nautilus (stable), process ceph-mon, pid 1
debug 2019-06-11 08:55:18.934 7fafa9547180 0 pidfile_write: ignore empty --pid-file
debug 2019-06-11 08:55:18.974 7fafa9547180 0 load: jerasure load: lrc load: isa
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option compression = kNoCompression
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option level_compaction_dynamic_level_bytes = true
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option write_buffer_size = 33554432
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option compression = kNoCompression
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option level_compaction_dynamic_level_bytes = true
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option write_buffer_size = 33554432
@figassis
figassis / compose.sh
Last active June 8, 2019 14:04
Media Center
#!/bin/bash
export USER_ID=$UID
docker-compose down; docker-compose up -d --force-recreate
@figassis
figassis / setup.sh
Last active July 2, 2023 16:33
Install docker on ubuntu
#!/bin/bash
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get -y install docker-ce ufw git
sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo adduser --disabled-password --gecos "" ubuntu
@figassis
figassis / my.cnf
Created January 23, 2019 08:59
Default mysql config
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
sql-mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
@figassis
figassis / usareacodes.json
Created December 3, 2018 18:52
US Area Codes
["201","202","203","204","205","206","207","208","209","210","212","213","214","215","216","217","218","219","220","223","224","225","226","228","229","231","234","236","239","240","242","246","248","249","250","251","252","253","254","256","260","262","264","267","268","269","270","272","276","279","281","284","289","301","302","303","304","305","306","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","330","331","332","334","336","337","339","340","343","345","346","347","351","352","360","361","364","365","367","380","385","386","401","402","403","404","405","406","407","408","409","410","412","413","414","415","416","417","418","419","423","424","425","430","431","432","434","435","437","438","440","441","442","443","445","450","456","458","463","469","470","473","475","478","479","480","484","500","501","502","503","504","505","506","507","508","509","510","512","513","514","515","516","517","518","519","520","530","531","533","534","539","540","541","544","54
@figassis
figassis / randomusphones.json
Created December 2, 2018 13:58
1000 valid us phone numbers for testing
["+1-418-543-8090","+1-587-530-2271","+1-404-724-1937","+1-443-307-1473","+1-329-420-1792","+1-770-212-6011","+1-473-522-7496","+1-477-962-3907","+1-478-797-3175","+1-948-914-6246","+1-268-763-5180","+1-369-441-8619","+1-501-926-2756","+1-223-919-0967","+1-328-857-2537","+1-636-613-5429","+1-547-538-9848","+1-523-317-7761","+1-557-680-6290","+1-905-546-5021","+1-975-999-8212","+1-358-342-3321","+1-669-937-7112","+1-506-676-9834","+1-510-518-1673","+1-282-995-0297","+1-667-407-8456","+1-396-518-2124","+1-528-705-6591","+1-395-288-8024","+1-390-949-5954","+1-437-295-3568","+1-227-799-6356","+1-703-363-8155","+1-618-720-3464","+1-557-394-8274","+1-237-257-1580","+1-623-416-0089","+1-533-762-6549","+1-299-471-0213","+1-790-548-2248","+1-469-253-5139","+1-580-303-6087","+1-507-639-8400","+1-269-771-0214","+1-645-818-7021","+1-436-974-4859","+1-952-660-7350","+1-493-885-4329","+1-697-392-0705","+1-744-865-4521","+1-887-526-1105","+1-816-630-9743","+1-496-717-7301","+1-212-475-2813","+1-222-993-6707","+1-868-574-867
@figassis
figassis / goinstall-docker.sh
Last active December 19, 2018 13:22
Installer Script for Go (Linux and OSX)
#!/bin/bash
#Chekc if running on OSX or Linux
case "$OSTYPE" in
darwin*) VERSION=go1.9.2.darwin-amd64.tar.gz ;;
*) VERSION=go1.9.2.linux-amd64.tar.gz ;;
esac
wget https://redirector.gvt1.com/edgedl/go/$VERSION
tar -C /usr/local -xzf $VERSION
<?
$entities = array('image', 'photo', 'text', 'source', 'site', 'traffic', 'money', 'book', 'e-book', 'file', 'smartphone', 'camera', 'notebook', 'cities', 'distances', 'cars', 'mobile', 'book', 'sex', 'love', 'classifieds', 'ads', 'alcohol', 'travel');
$verbs = array('sell', 'buy', 'rent', 'exchange', 'free', 'give', 'book', 'clean', 'find', 'classify', 'compare');
echo '<table style="width: 100%">';
foreach ($entities as $entity)
{
echo '<tr>';
foreach ($verbs as $verb)
echo "<td style='font-size: 14px; padding: 5px; text-align: center'>$verb $entity</td>";
echo '</tr>';