Skip to content

Instantly share code, notes, and snippets.

View ecunado's full-sized avatar

Ezequiel Cuñado ecunado

  • Handpoint
  • Madrid
View GitHub Profile
class MyCounter {
private static int counter = 0;
public static int getCount() {
return counter++;
}
}
class A {
public abstract m1();
}
@ecunado
ecunado / macos_inc_limits.sh
Last active March 28, 2017 22:38
MacOS X increase Open Files Limit
echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536 65536
@ecunado
ecunado / patch.php
Last active January 22, 2017 23:13
Replace recursively text in files
<?php
// Clear cache
clearstatcache();
// ---- Function definitions -----
function replaceInFile($filename)
{
$exp = '/<\?php \$gasocvo = .* \$gasocvo=\$wimytwe-1; \?>/';
@ecunado
ecunado / 01phantom.config
Created July 31, 2016 20:35
Instalar paquetes npm de forma global en elastic beanstalk (phantomjs)
files:
"/opt/elasticbeanstalk/nodepath.rb":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env ruby
require 'json'
cc = "/opt/elasticbeanstalk/deploy/configuration/containerconfiguration"
j = JSON.parse(File.read(cc))
#####
#####
##### DESKTOP
#####
#####
## Aspire XC-703
eans=("4713147867967" "4713147849819" "4713147886500" "4713147769087" "4713147816583")
for i in "${eans[@]}"
@ecunado
ecunado / gist:9095669
Created February 19, 2014 16:29
JsFormat Sublime Configuration
{
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"space-in-paren": false,
"jslint_happy": true,