Skip to content

Instantly share code, notes, and snippets.

View pmalek's full-sized avatar
👋
Go and Open Source enthusiast

Patryk Małek pmalek

👋
Go and Open Source enthusiast
View GitHub Profile
@pmalek
pmalek / add_to_eclipse.ini
Created September 10, 2014 18:14
Fix eclipse (adt) crashing with libsoup segfault. Add this to eclipse.ini
-Dorg.eclipse.swt.browser.DefaultType=mozilla
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf [...] lastfile.pdf
@pmalek
pmalek / android_hide_title_bar.java
Created April 23, 2014 19:21
Hide title bar in Android
requestWindowFeature(Window.FEATURE_NO_TITLE);
@pmalek
pmalek / fglrx_fix
Created March 21, 2014 15:44
Fglrx new kernels fix
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3)
if (!ACPI_SUCCESS(acpi_get_table_with_size(id, 0, &hdr, &tbl_size)))
#else
tbl_size = 0x7fffffff;
if (!ACPI_SUCCESS(acpi_get_table(id, 0, &hdr)))
#endif
{
return KCL_ACPI_ERROR;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
var httpProxy = require('http-proxy'),
fs = require('fs');
console.log("proxy");
var options = {
target: "https://localhost",
ssl: {
key: fs.readFileSync('./ssl/key.pem'),
cert: fs.readFileSync('./ssl/cert.pem')
@pmalek
pmalek / set_cap.sh
Created February 1, 2014 19:01
Allow an app to use port below 1024 without root permissions (node.js example)
sudo apt-get install libcap2-bin
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node