Skip to content

Instantly share code, notes, and snippets.

Giuseppe Modarelli gmodarelli

Block or report user

Report or block gmodarelli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
sudo dpkg -i erlang-solutions_1.0_all.deb
gmodarelli / config.ex
Last active Mar 31, 2018 — forked from bitwalker/config.ex
Useful config wrapper for Elixir
View config.ex
defmodule Config do
@moduledoc """
This module handles fetching values from the config with some additional niceties
@doc """
Fetches a value from the config, or from the environment if {:system, "VAR"}
is provided.
An optional default value can be provided if desired.
gmodarelli / delay.xml
Created Feb 19, 2015
MongooseIM contribution
View delay.xml
<x xmlns='jabber:x:delay' from='' stamp='20020910T23:08:25'>Offline Storage</x>
gmodarelli / pre-commit
Last active Feb 1, 2019
RuboCop with git pre-commit
View pre-commit
# Check for ruby style errors
if git rev-parse --verify HEAD >/dev/null 2>&1
gmodarelli / image.html
Last active Aug 29, 2015
AngularJS Promises
View image.html
<div ng-controller="ImageCtrl">
<div class="ddarea" ng-file-drop="onFileDropped($files)" ng-file-drag-over-class="dropping">
<p>Drag & Drop your design image here</p>
<div class="layers">
<div class="layer" ng-class="{ active : }" ng-repeat="layer in layers">
<div style="background-image: url({{layer.thumb}})"></div>
<a ng-click="removeLayer(layer)">Remove</a>
gmodarelli / .env
Last active Aug 29, 2015
ESC #1: Dotenv
View .env
gmodarelli / category.rb
Last active Aug 29, 2015
Migrating from a 1-to-many association to a many-to-many association
View category.rb
class Category < ActiveRecord::Base
# Old association
belongs_to :topic
# New association
has_and_belongs_to_many :topics
gmodarelli / default_value.rb
Last active Aug 29, 2015
Source Code Reading
View default_value.rb
define_method(abbr) { |date = nil|, date) }
View login.test.js
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
View Gemfile
gem 'xml2json', git: ''
You can’t perform that action at this time.