Skip to content

Instantly share code, notes, and snippets.

@BorePlusPlus
BorePlusPlus / after.log
Last active September 23, 2016 16:44
Missing bytes
Client :: ready
Stat: Stats {
mode: 33206,
permissions: 33206,
uid: undefined,
gid: undefined,
size: 1172943,
atime: 1473984262,
mtime: 1473984262 }
bytesRead: 32768 thisPool.length: 32768
@BorePlusPlus
BorePlusPlus / Session
Created July 30, 2014 10:46
Setuid/Getuid in golang
$ go build setuid.go
$ sudo su
[sudo] password for bore:
# chown root:root setuid
# chmod u+s setuid
$ ./setuid
Real UID: 1000
Effective UID: 0
Real UID: 1000
Effective UID: 1000
@BorePlusPlus
BorePlusPlus / cluster-sig.js
Last active December 20, 2015 23:28
node.js cluster kill
var cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork();
cluster.on('exit', function(worker, code, signal) {
console.log('Worker exited:', worker.process.pid);
});
setTimeout(function () {
@BorePlusPlus
BorePlusPlus / plugin.js
Last active December 18, 2015 14:19
Brightcove plugin test
(function() {
console.log('*** HERE WE GO ***');
function onPlayerReady() {
alert('Done');
}
})();
@BorePlusPlus
BorePlusPlus / actual-ivy.xml
Created November 25, 2012 22:57
Single ivy module multi project gradle build
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="org.bpp"
module="ivy-test"
revision="1.0"
status="integration"
publication="20121126212929"
/>
<configurations>
<conf name="archives" visibility="public" description="Configuration for archive artifacts."/>
@BorePlusPlus
BorePlusPlus / Sample.java
Created September 23, 2012 17:30
Gradle: Passing arguments to compiler and javadoc. (Getting rid of "warning: sun.misc.Unsafe is internal proprietary API and may be removed in a future release")
//Should be placed in './src/main/java/org/bore/sample' directory
package org.bore.sample;
import sun.misc.Unsafe;
public class Sample {
public int foo() {
return Unsafe.getUnsafe().pageSize();
}