Skip to content

Instantly share code, notes, and snippets.

View ticapix's full-sized avatar

Pierre Gronlier ticapix

View GitHub Profile
@ticapix
ticapix / Makefile
Last active February 14, 2020 09:08
Stub for python Makefile
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PYTHON3=python3
VENV_DIR=$(ROOT_DIR)/venv3
NAME=$(shell basename $(ROOT_DIR))
ECHO=@echo
RM=rm -rf
.PHONY: help
help:
@ticapix
ticapix / cowroot.c
Created October 21, 2016 15:47 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
# installing NodeJS on Raspberry Pi (armv6l)
curl -sL https://nodejs.org/dist/v6.7.0/node-v6.7.0-linux-armv6l.tar.xz | tar --directory /\
usr/local/ --strip-components=1 -xvJf -
pact install python-setuptools python3-setuptools
easy_install-2.7 pip
easy_install-3.4 pip
// ==UserScript==
// @name AutoAnswer
// @namespace skype.com
// @include https://*web*.skype.com/*
// @version 1
// @grant none
// ==/UserScript==
var authorized_contacts = [
'Skype name'
];
@ticapix
ticapix / Find-String.ps1
Last active November 26, 2015 07:13
grep in powershell
# ORIGIN http://weblogs.asp.net/whaggard/powershell-script-to-find-strings-and-highlight-them-in-the-output
# Find-String.ps1
# Wrapper around dir | select-string which will highlight the pattern in the results
param ( [string] $pattern = ""
, [string] $filter = "*.*"
, [switch] $recurse = $false
, [switch] $caseSensitive = $false)
if ($pattern -eq $null -or $pattern -eq "") { Write-Error "Please provide a search pattern!" ; return }
const uint8_t SYMBOLS[17] =
{
0xC0, // 0
0xF9, // 1
0xA4, // 2
0xB0, // 3
0x99, // 4
0x92, // 5
0x82, // 6
0xF8, // 7
#include <TimerOne.h>
const uint8_t SYMBOLS[] =
{
0xC0, // 0
0xF9, // 1
0xA4, // 2
0xB0, // 3
0x99, // 4
0x92, // 5
@ticapix
ticapix / doc_CMakeLists.txt
Last active August 29, 2015 14:07
Doxygen with Cmake
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(SOURCE_DIRECTORIES
${CMAKE_SOURCE_DIR}/src/
# to complete if needed
)
# convert every directory to relative path because doxygen from cygwin env is
# prefixing the paths by a cygwin path ending in /cygwin/c/.../C:/.../Foundation
@ticapix
ticapix / mybashrc
Created October 20, 2014 12:23
cygwin survival profile script
echo "Adding MSBuild to the path"
PATH="`cygpath.exe "C:\Program Files (x86)\MSBuild\12.0\bin\"`:$PATH"
PATH="`cygpath.exe "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC"`:$PATH"
echo "Setting source-highligthing"
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
export LESS=' -R '
echo "Adding npp aka Notepad++ alias"
function npp() {