Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
o/

João Silva Xplouder

:octocat:
o/
View GitHub Profile
@fideloper
fideloper / app.js
Last active Oct 17, 2016
Using Event Emitter in your node modules
View app.js
var Fancy = require('FancyModule');
var mod = new Fancy();
mod.on('success', function(data) {
console.log(data); // { this_is_fancy:'indubitably' }
});
@theDisco
theDisco / Vagrantfile
Created Sep 17, 2012
Vagrant setup for phalcon projects
View Vagrantfile
Vagrant::Config.run do |config|
config.vm.box = "squeeze32"
config.vm.network :hostonly, "192.168.50.100"
config.vm.forward_port 80, 8080
end
@ChuckJHardy
ChuckJHardy / gource.md
Last active Apr 5, 2021
Gource Recording for Git
View gource.md

Install Gource

brew install gource

Convert Quicktime Movie to Animated Gif

ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

Record Gource

@voxxit
voxxit / USING-VAULT.md
Last active Apr 19, 2021
Consul + Vault + MySQL = <3
View USING-VAULT.md
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@sergeyklay
sergeyklay / journalctl-cheatsheet.md
Last active Sep 8, 2021
Journalctl Cheat Sheet
View journalctl-cheatsheet.md

Journalctl Cheat Sheet

Configuration

Permissions

To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:

sudo usermod -aG systemd-journal $USER
@baojie
baojie / hello_multiprocessing.py
Created Jul 21, 2013
Python multiprocessing hello world. Split a list and process sublists in different jobs
View hello_multiprocessing.py
import multiprocessing
# split a list into evenly sized chunks
def chunks(l, n):
return [l[i:i+n] for i in range(0, len(l), n)]
def do_job(job_id, data_slice):
for item in data_slice:
print "job", job_id, item
@ck-on
ck-on / ocp.php
Last active Oct 15, 2021
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
View ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@nstielau
nstielau / send_metric_to_statsd.sh
Created May 11, 2011
Send a metric to StatsD from bash
View send_metric_to_statsd.sh
# Send a metric to statsd from bash
#
# Useful for:
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/)
# init scripts
# sending metrics via crontab one-liners
# sprinkling in existing bash scripts.
#
# netcat options:
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed.
@zfael
zfael / nodejs.checksum.js
Created Jun 20, 2017
NODE.JS - How to generate file's Checksum (CRYPTO)
View nodejs.checksum.js
var fs = require('fs');
var crypto = require('crypto');
fs.readFile('file.pdf', function(err, data) {
var checksum = generateChecksum(data);
console.log(checksum);
});
function generateChecksum(str, algorithm, encoding) {
return crypto
View RHCE8-EX294-Practice-Exam.md

Requirements

There are 18 questions in total. You will need five RHEL 8 (or CentOS 😎 virtual machines to be able to successfully complete all questions.

Optional Automatic Exam Setup Available

Here is an automated exam environment deployment for Mac/Linux/Windows that deploys the practice exam environment for you, including IPA server/client installation and configuration. You can also use your own lab environment. Navigate to the respective repo you wish to use for this practice exam and follow the README instructions:

https://github.com/rdbreak/rhce8env, https://github.com/rdbreak/ansible27env, https://github.com/rdbreak/ansible8env.