Skip to content

Instantly share code, notes, and snippets.

commit 09c06a2f457ec9557bcdf1809ecb4b50b2fb654a
Author: Amine Khaldi <amine.khaldi@reactos.org>
Date: Fri Oct 27 22:18:01 2017 +0100
[CLANG-CL] Initial commit that allows us to compile ReactOS with clang-cl.
diff --git a/sdk/cmake/Platform/Windows-MSVC.cmake b/sdk/cmake/Platform/Windows-MSVC.cmake
index dc09c7479f2..5c3912cfeab 100644
--- a/sdk/cmake/Platform/Windows-MSVC.cmake
+++ b/sdk/cmake/Platform/Windows-MSVC.cmake
@ariscop
ariscop / ts_unpack.py
Created February 11, 2015 01:17
Unpacker for topsee camera firmware
#!/usr/bin/env python3
import sys
import crcmod
from struct import unpack
from collections import namedtuple
def to_hex(data):
return ''.join('%02x' % x for x in data)
@ariscop
ariscop / main.c
Created May 23, 2013 07:09
subreaper, sets PR_SET_CHILD_SUBREAPER so you can have a nice looking process tree in htop
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/prctl.h>
int main(int argc, char *argv[]) {
if(argc < 2) {
puts("Insufficent parameters");
[andrew@andrews-laptop tmp]$ cat test.cpp
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
string *str = new string("test");
}
[andrew@andrews-laptop tmp]$ g++ -nostdlib test.cpp
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400144
@ariscop
ariscop / traccar_postgresql_schema.sql
Created December 9, 2014 01:04
Postgresql compatible traccar schema
CREATE TABLE application_settings (
id bigserial NOT NULL,
registrationenabled boolean NOT NULL
);
CREATE TABLE devices (
id bigserial NOT NULL,
name character varying(255),
uniqueid character varying(255),
latestposition_id bigint
@ariscop
ariscop / ytdl.user.js
Last active October 12, 2015 11:26
Greasemonkey script for downloading youtube videos
// ==UserScript==
// @name Youtube download links
// @namespace sothiscanbeanythingright
// @description Adds a tab for downloading youtube videos
// @include http://www.youtube.com/watch*
// @include https://www.youtube.com/watch*
// @version 1
// @grant none
// ==/UserScript==
@ariscop
ariscop / gist:3825731
Created October 3, 2012 08:03
Php fun
class a {
protected $foo = "foo";
function foo() {
print($this->foo);
}
function a() {
$this->foo = "bar";
$this->foo();
}
};
from collections import defaultdict
TAG_TYPE_NULL = 0x1000
TAG_TYPE_BYTE = 0x2000
TAG_TYPE_WORD = 0x3000
TAG_TYPE_DWORD = 0x4000
TAG_TYPE_QWORD = 0x5000
TAG_TYPE_STRINGREF = 0x6000
TAG_TYPE_LIST = 0x7000
TAG_TYPE_STRING = 0x8000
@ariscop
ariscop / script
Created October 2, 2015 02:32
Gdb script for logging backtraces when a function is called
set pagination off
set logging file gdb.txt
set logging on
break sendto_realops_snomask
commands
bt full
c
end
@ariscop
ariscop / raptor-httpd.sh
Created March 20, 2012 03:01
raptor-httpd, you will be eaten by raptors if you ever use this
#!/bin/bash
http-accept() {
read -r REQ <&3
REQ=`echo "$REQ" | tr '\r\n' ' '`
#read -r LINE <&3
#while [ -n "$LINE" ]; do
# read -r LINE <&3