Skip to content

Instantly share code, notes, and snippets.

View jonathanpmartins's full-sized avatar
🏠
Working from home

Jonathan Prass Martins jonathanpmartins

🏠
Working from home
  • Brazil
  • 22:12 (UTC -03:00)
View GitHub Profile
{
"title": "collectd-post",
"services": {
"query": {
"list": {
"0": {
"query": "plugin: \"cpu\" AND plugin_instance: \"0\"",
"alias": "cpu1",
"color": "#7EB26D",
"id": 0,
@johnhout
johnhout / setup_laravel.sh
Last active September 4, 2015 16:32
Laravel 5 quick install bash!
#!/bin/sh
# Laravel 5 new project setup bash script.
# Inspired by Mitchell van Wijngaarden
# Extended by John in 't Hout
projectname=$1
git clone -o laravel -b develop https://github.com/laravel/laravel.git ${projectname} >/dev/null
cd ${projectname}
git checkout --orphan master
@cristianobecker
cristianobecker / type.js
Created October 17, 2014 19:24
Get the type of any object in JavaScript
function type(e) {
var t = Object.prototype.toString.call(e),
r = /\[object (\w+)\]/i.exec(t);
return r && r[1].toLowerCase();
}
[1,"2", true, null, [], {}, function() {}, undefined].forEach(function(e){
console.log(type(e))
});
@cristianobecker
cristianobecker / cpf.js
Last active April 26, 2016 17:17
Validar CPF por javascript
var CPF = (function () {
var eleven = 11;
function mod(n) {
var t = eleven,
a = n % t;
return (a < 2 ? 0 : t - n % t) + '';
}
@lukaswhite
lukaswhite / ClearBeanstalkdQueueCommand.php
Last active February 6, 2025 13:11
Clear a Beanstalkd Queue in Laravel
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**
@dweldon
dweldon / meteor-nginx
Last active January 22, 2024 06:53
This is an example of how to configure nginx to serve a meteor app.
server {
listen [::]:80;
listen 80;
server_name app.example.com;
return 301 https://$server_name$request_uri;
}
server {
@onyxraven
onyxraven / rds.sh
Last active June 21, 2022 13:42 — forked from douglasjarquin/gist:2208690
Amazon RDS Performance Tuning Settings
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120