Skip to content

Instantly share code, notes, and snippets.

@mtnmts
mtnmts / stupid-spotlight.sh
Created February 12, 2018 15:35 — forked from afjoseph/stupid-spotlight.sh
When spotlight indexing turns to shit...
#!/bin/sh
# Reference: https://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight
sudo mdutil -a -i off
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo mdutil -a -i on /
@mtnmts
mtnmts / gist:3ba8c9b5b35cffed5d68203b2fc153f5
Created February 9, 2018 20:50
The food you will eat.txt.jpg.exe
TYO Mido Oban-Koban Captain-Curry Nithan-Thai Abu-Adham(Walk) Ze-Sushi Carmelis Miznon
@mtnmts
mtnmts / fabfile.py
Last active June 4, 2016 16:52
SoftEther VPN For Linux Clients
from fabric.api import *
SOFTETHER_SERVER_URL = "http://www.softether-download.com/files/softether/v4.21-9613-beta-2016.04.24-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.21-9613-beta-2016.04.24-linux-x64-64bit.tar.gz"
PUBLIC_CERT = '~/.ssh/cert/publickey.cer'
DNSMASQ_FILE = """interface=tap_soft
bind-interfaces
dhcp-range=tap_soft,192.168.7.50,192.168.7.60,12h
dhcp-option=tap_soft,3,192.168.7.1"""
@mtnmts
mtnmts / fabric_ci.sh
Last active May 14, 2016 15:06
fabric CI
#! /bin/bash
while inotifywait -r -e close_write --exclude '/\..+' $1; do cd $1 & fab publish; done &
@mtnmts
mtnmts / read_microcode_update.py
Created December 7, 2014 00:22
Basic reading of updates, todo validate checksum and read everything for real and put everything in normal types
# Author : Matan M. Mates
# Purpose: Parse an inc file and print some info about it
import sys
import struct
ARGC = 2
unpack_struct = ">IIBBBBIIIIII12s"
@mtnmts
mtnmts / parse_microcode_dat.py
Last active June 28, 2016 20:41
Parses intel's microcode dat file into the actual inc's
# Author : Matan M. Mates
# Purpose: Parse Intel's microcode files into binaries
import re
import os
MICROCODE_FILE = "./microcode.dat"
LICENSE_MARKER = '/---'
OUTPUT_DIR = '.' + os.sep + "parsed_files"
COMMENT_CLOSE_MARKER_RE, COMMENT_START_MARKER_RE = "\*/", "/\*"
COMMENT_CLOSE_MARKER, COMMENT_START_MARKER = "*/", "/*"
@mtnmts
mtnmts / solve_stego.py
Created July 26, 2014 17:03
Solution for Stego75 - Pwnium 2014
# Author : Matan M. Mates
# Purpose : Solve Stego75
import Image
# Color ladders
LADDER_RANGES = [((1,0) , (56,55)),
((57,0), (112,55)),
((113,0), (168,55)),
((169,0), (224,55)),
((225,0), (280,55)),
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort [a | a <- xs, a <= x]
biggerSorted = quicksort [a | a <- xs, a > x]
in smallerSorted ++ [x] ++ biggerSorted