Skip to content

Instantly share code, notes, and snippets.

View dienncrelipa's full-sized avatar

dienncrelipa

View GitHub Profile
@dienncrelipa
dienncrelipa / .drone.yml
Created September 27, 2018 17:47 — forked from d0x2f/.drone.yml
.drone.yml example
workspace:
base: /build
pipeline:
dbnode1:
detach: true
image: mysql/mysql-cluster:7.5
commands:
- sleep 5
@dienncrelipa
dienncrelipa / exp
Last active September 24, 2018 10:08
exp bash
#!/usr/bin/expect -f
set timeout 3
set cmd [lrange $argv 1 end]
set password [lindex $argv 0]
eval spawn $cmd
expect "password:"
send "$password\r";
/<meta[\s]*([^>]+)(name="keywords")[\s]*([^>]*)>/
@dienncrelipa
dienncrelipa / no-comments.js
Created August 2, 2018 04:29 — forked from Darep/no-comments.js
Remove all comments from GitHub Pull Request
// Sometimes it's necessary to do a bit of clean-up
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) {
el.removeAttribute('data-confirm');
el.click();
});
for region in `aws ec2 describe-regions --output text | cut -f3`
do
aws ec2 describe-instances --region $region | jq '.Reservations[] | ( .Instances[] | {state: .State.Name, tag: .Tags[0].Value, name: .KeyName, type: .InstanceType, key: .KeyName})'
done
@dienncrelipa
dienncrelipa / gist:e19f6bed56ac97e5183143fb87b20405
Created July 26, 2018 09:51
Fix composer install : proc_open(): fork failed - Cannot allocate memory
Run command below :
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1