Skip to content

Instantly share code, notes, and snippets.

View soxfmr's full-sized avatar
🎯
Focusing

soxfmr

🎯
Focusing
  • /dev/null
View GitHub Profile
@xaitax
xaitax / fix_vmware_kernel_3.11.sh
Created September 3, 2013 14:58
Linux Kernel 3.11: With it comes a kernel-level API change related to VFS. Specifically, struct file_operations no longer contains the function pointer readdir and vfs_readdir() which was defined in fs/readdir.c is now gone. They are both superseded by iterate and iterate_dir() respectively. Linux Kernel 3.10: mnet/vmblock patch for Kernel 3.10 …
cd /tmp
curl -O http://www.primepage.de/stuff/vmware/vmblock-9.0.2-5.0.2-3.10.patch
curl -O http://www.primepage.de/stuff/vmware/vmnet-9.0.2-5.0.2-3.10.patch
curl -O http://www.primepage.de/stuff/vmware/vmblock.3.11.patch
cd /usr/lib/vmware/modules/source
tar -xvf vmblock.tar
tar -xvf vmnet.tar
patch -p0 -i /tmp/vmblock-9.0.2-5.0.2-3.10.patch
patch -p0 -i /tmp/vmnet-9.0.2-5.0.2-3.10.patch
cd vmblock-only
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@glombard
glombard / ClipboardNotification.cs
Created December 16, 2013 12:34
Monitor Clipboard changes in C# using AddClipboardFormatListener / WM_CLIPBOARDUPDATE. See Clipboard class: http://msdn.microsoft.com/en-us/library/system.windows.clipboard(v=vs.110).aspx
// from: http://stackoverflow.com/questions/2226920/how-to-monitor-clipboard-content-changes-in-c
/// <summary>
/// Provides notifications when the contents of the clipboard is updated.
/// </summary>
public sealed class ClipboardNotification
{
/// <summary>
/// Occurs when the contents of the clipboard is updated.
/// </summary>
@kramarama
kramarama / xdebug
Created March 21, 2014 19:58
install xdebug on centos
http://xdebug.org/install.php#configure-php
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/
on CentOS:
1. You need to install PHP’s devel package for PHP commands execution
yum install php-devel
yum install php-pear
2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
/*
* exception handling routines (xp 32-bit, partial/incomplete)
*
* ntdll 5.1.2600.5755
* v2 (updated jan 2011)
*
* - hawkes <hawkes@sota.gen.nz>
*
* useful link: http://www.eeye.com/html/resources/newsletters/vice/VI20060830.html
*
@geudrik
geudrik / getPETimestamp.py
Last active February 8, 2023 07:15
Read the PE Timestamp from a Windows Executable (PE) in Python
#! /usr/bin/env python2.7
#
# Author: Pat Litke (C) 2014
#
# This code is released under the WTFPL V2 http://www.wtfpl.net/
#
# License:
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@oogali
oogali / metasploit-install-on-centos.sh
Last active September 5, 2021 23:27
Install Ruby 2.1.5 via rbenv, then Metasploit on CentOS
# install build deps
sudo yum install gcc gcc-c++ make expat-devel gettext-devel libcurl-devel \
libffi-devel libxml2-devel libxslt-devel libyaml-devel postgresql-server \
postgresql-devel readline-devel sqlite-devel openssl-devel ruby-devel \
rubygems autoconf automake bison libtool libpcap-devel
# install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
@lloeki
lloeki / gist:62239da19ec25f90f215
Created December 16, 2014 16:15
open-vm-tools with clipboard and drag and drop on Ubuntu 14.04 Trusty Tahr
# You should be using open-vm-tools instead of vmware tools, because package manager.
# Also I hate third parties that write out of /opt and /usr/local.
# open-vm-tools-desktop is badly packaged though, here are the missing links:
sudo apt-get install open-vm-tools open-vm-tools-desktop
# Reboot, and resize works, but no DnD nor clipboard
sudo mkdir /var/run/vmblock-fuse
sudo su -l -c "vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse"
# Now we have /run/vmblock-fuse populated.
# Adding an upstart rule in /etc/init is left as an exercise to the reader.
@etasi
etasi / vim-great-cheatsheet.md
Created February 17, 2015 23:05
VIM: A Great Vim Cheat Sheet
layout title
default
A Great Vim Cheat Sheet

#A Great Vim Cheat Sheet

Note: If you’re decent at vim and want your mind blown, check out Advanced Vim.