Skip to content

Instantly share code, notes, and snippets.

attilathedud

Block or report user

Report or block attilathedud

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@attilathedud
attilathedud / task_for_pid.c
Last active Apr 13, 2019
Mac OS X El Capitan (10.11) and task_for_pid()
View task_for_pid.c
/*
Full explanation is available here: http://attilathedud.me/mac-os-x-el-capitan-10-11-and-task_for_pid/
*/
/*
To compile, create a file called Info.plist with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@attilathedud
attilathedud / sneeze_detector.py
Created Feb 17, 2019
Detect and play a sound when a loud noise is recorded
View sneeze_detector.py
#!/usr/bin/env python3
""" Sneeze/loud sound detector """
import math
import numpy as np
try:
import sounddevice as sd
import soundfile as sf
sound_threshold = 5
@attilathedud
attilathedud / text_editor.c
Created Oct 21, 2018
A simple terminal text editor using ncurses
View text_editor.c
// A full breakdown of the code involved can be found at http://attilathedud.me/writing-a-terminal-text-editor/
// To compile, make sure to link ncurses:
// gcc -o editor text_editor.c -Wall -lncurses
#include <ncurses.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define KEY_DELETE 127
@attilathedud
attilathedud / word_brain_solver.py
Created Jan 31, 2018
Utility script to solve Word Brain puzzles
View word_brain_solver.py
"""
word_brain_solver.py is a simply utility script that can be used to solve Word Brain/Word Up/any Boogle-type derivative. The code is uses a pretty lazy approach: it loads the word dictionary (generated by SCOWL) into a hashmap, and then uses a recursive strategy to iterate over every possible combination of letters present in the puzzle.
While it is not the most optimized approach, it solves 6x6 puzzles in ~2 seconds.
The code is licensed under the MIT license and free to modify as you see fit.
"""
import mmap
from collections import defaultdict
@attilathedud
attilathedud / BrowserQuest-bot.js
Created Jan 28, 2018
An auto-attack bot for BrowserQuest
View BrowserQuest-bot.js
/*!
* A bot for BrowserQuest(http://browserquest.mozilla.org/) that hooks the client to send auto-attack commands. Can be seen in
* action at https://gfycat.com/ifr/EcstaticHomelyEastrussiancoursinghounds
*
* Execute in the developer console after you load into the server with your player. Tested with Chrome.
*/
/*!
* Development was done on a modified version (https://github.com/nenuadrian/BrowserQuest) of BrowserQuest that fixed some
* dependency issues in the original version.
@attilathedud
attilathedud / hp_hack.c
Created Sep 21, 2017
An offline health trainer for OSX CS2D 1.0.0.3.
View hp_hack.c
/*
* Full write-up and explanation is available at: http://attilathedud.me/basic-osx-memory-hacking/
*/
/*
To compile, create a file called Info.plist with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
You can’t perform that action at this time.