Skip to content

Instantly share code, notes, and snippets.

View donnykurnia's full-sized avatar

Donny Kurnia donnykurnia

View GitHub Profile
@evgenyneu
evgenyneu / Shell
Created December 29, 2016 08:01
Calling rollbar deployment webhook
ACCESS_TOKEN=secret
ENVIRONMENT=production
LOCAL_USERNAME=`whoami`
REVISION=`git log -n 1 --pretty=format:"%H"`
curl https://api.rollbar.com/api/1/deploy/ \
-F access_token=$ACCESS_TOKEN \
-F environment=$ENVIRONMENT \
-F revision=$REVISION \
-F local_username=$LOCAL_USERNAME
@Maysora
Maysora / hosts
Last active May 22, 2021 12:38
hosts file for blocking malicious script injection
# Telkom Speedy / Indihome
0.0.0.0 internet-positif.org
0.0.0.0 stat01.u-ad.info
0.0.0.0 cfs.u-ad.info
0.0.0.0 u-ad.info
0.0.0.0 cfs.uzone.id
0.0.0.0 cfs1.uzone.id
0.0.0.0 cfs2.uzone.id
0.0.0.0 kendedes.uzone.id
0.0.0.0 mercusuar.uzone.id
@muresan
muresan / Vagrantfile
Last active August 3, 2020 11:14
Vagrant virtualbox multiple disks
osd_data_size = 6
osd_journal_size = 6
osd_path = '/d02/vagrant/virtualbox-ceph-disks'
hosts = {
'mon-1' => {
'ip' => '10.253.60.151', 'cpus' => 1, 'memory' => 1024, 'autostart' => true,
'data_disk_size' => osd_data_size * 1024, 'journal_disk_size' => osd_journal_size * 1024 },
}
#!/bin/sh
wget https://gist.githubusercontent.com/OpakAlex/6ffc1ba4bf10312a9635/raw/0a870c574e42f10e7acd52d88822e5f5ec6c2972/bootsync.sh -O /tmp/bootsync.sh
docker-machine scp /tmp/bootsync.sh lab:/tmp/bootsync.sh >/dev/null
docker-machine ssh lab "sudo mv /tmp/bootsync.sh /var/lib/boot2docker/bootsync.sh" >/dev/null
#!/bin/sh
sudo umount /Users
sudo /usr/local/etc/init.d/nfs-client start
sleep 1
sudo mount.nfs 192.168.99.1:/Users /Users -v -o rw,async,noatime,rsize=32768,wsize=32768,proto=udp,udp,nfsvers=3
grep '\-\-dns' /var/lib/boot2docker/profile || {
echo 'EXTRA_ARGS="$EXTRA_ARGS --dns 192.168.99.100 --dns 8.8.8.8 --dns 8.8.4.4"' | sudo tee -a /var/lib/boot2docker/profile
}
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee /etc/resolv.conf
@rkusa
rkusa / README
Created January 11, 2016 09:10
Install alpine linux on xhyve VM
# curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.1-x86_64.iso
curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86/alpine-3.3.1-x86.iso
# create hdd image (8GB)
dd if=/dev/zero of=hdd.img bs=1g count=8
# extract kernel and initramfs
brew install cdrtools
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/initramfs-grsec > initramfs-grsec
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/vmlinuz-grsec > vmlinuz-grsec
@bishboria
bishboria / springer-free-maths-books.md
Last active May 10, 2025 04:28
Springer made a bunch of books available for free, these were the direct links
@Stanback
Stanback / coffee2js.sh
Last active July 11, 2019 10:30
Convert all CoffeeScript files to Javascript (coffee2js)
#!/bin/sh
# Install coffeescript cli
npm -g install coffee-script
# Convert all coffeescript files to javascript
find . -name "*.coffee" -exec coffee --no-header --bare -c {} \;
# Optionally delete original coffee files
find . -name "*.coffee" -exec rm {} \;
@ljmccarthy
ljmccarthy / qemu-winxp.sh
Created November 28, 2015 18:31
QEMU command line for Windows XP
#!/bin/sh
exec qemu-system-i386 -enable-kvm -cpu host -m 1024 -vga std -soundhw ac97 -net nic,model=rtl8139 \
-net user -drive file=winxp.img,format=raw -drive file=/usr/share/virtio/virtio-win.iso,media=cdrom
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites