Skip to content

Instantly share code, notes, and snippets.

View mpfund's full-sized avatar

Marinus Pfund mpfund

  • ifempty
  • Munich
View GitHub Profile
alert(1);
@mpfund
mpfund / mysql_backup.bat
Created July 14, 2014 12:56
Mysql Backup & Restore
"C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\mysqldump.exe" -u [username] -p[password] --host=[hostname] --default-character-set=utf8 [dbname] > dbname.sql
@mpfund
mpfund / windbg_common_commands.txt
Created July 14, 2014 12:53
Windbg Common Commands
.symfix c:\symbols
.reload
.cordll -ve -u -l
.loadby sos clr
sxe ld:mscorlib
All stacktraces in every thread
~*e!clrstack
@mpfund
mpfund / fuzz_http.go
Created July 14, 2014 08:28
extremly simple fuzzer for http
package main
import "fmt"
import "net"
import "bufio"
import "io/ioutil"
import "time"
import "bytes"
import "strings"
@mpfund
mpfund / oracle_exception_01652.txt
Created July 14, 2014 08:10
Oracle Exception 01652 "unable to extend temp segement" & fix
Oracle Exception:
{"ORA-01652: unable to extend temp segment by 2048 in tablespace TS_TEMP"}
Fix:
SELECT file_name, tablespace_name, ROUND(bytes/1024000) MB
FROM dba_data_files
ORDER BY 1;
alter tablespace ts_temp add TEMPFILE 'C:\app\inloox_oracle\product\12.1.0\dbhome_2\database\TEMP04.dbf' size 2000M autoextend on;
public static void RemoveDelegateFromEvent(object target, string EventPropertyName)
{
var bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |BindingFlags.Static;
var ev = target.GetType().GetEvent(EventPropertyName, bindingFlags);
var f1 = target.GetType().GetField(EventPropertyName, bindingFlags);
// search in base class
if (f1 == null)
f1 = target.GetType().BaseType.GetField(EventPropertyName, bindingFlags);
@mpfund
mpfund / gist:7656361
Created November 26, 2013 10:38
Usercontrol: prints all system fonts
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
var props = typeof(System.Drawing.SystemFonts).GetProperties();
@mpfund
mpfund / connectToSQL.cs
Created September 9, 2013 13:17
Simple connection to SQL-Server (localDB)
class Program
{
static void Main(string[] args)
{
string connstr = "Data Source=(localDB)\\v11.0;Initial Catalog=inloox;Integrated Security=true";
SqlConnection conn = new SqlConnection(connstr);
try
{
conn.Open();
var comm = conn.CreateCommand();
@mpfund
mpfund / gist:6288711
Created August 20, 2013 23:35
Walk Trees
public static class WalkTreeExtension
{
public static void DoWalk<T>(this IEnumerable<T> ienu, Action<T> a, Func<T,IEnumerable<T>> childs)
{
foreach(var e in ienu)
{
a(e);
DoWalk(childs(e), a, childs);
}
}

sources

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

sudo add-apt-repository ppa:webupd8team/sublime-text-2 

update

sudo apt-get update

packages