Skip to content

Instantly share code, notes, and snippets.

View ericbroska's full-sized avatar

Eric Broska ericbroska

View GitHub Profile
@ericbroska
ericbroska / gist:6078781
Last active December 20, 2015 05:29
Мультиварки, избранное, low-end
Polaris PMC 0509AD
-----------------
http://market.yandex.ru/model.xml?modelid=9361512
650 Вт, 5л, тефлон, регулировка температуры/времени
[Варка, Крупа, Разогрев, Суп, Приготовление на пару, Выпекание, Жарение, Тушение]
Binatone MUC-2116
-----------------
http://market.yandex.ru/model.xml?modelid=8540398
430 Вт, 1.6 л, керамика
1 вариант.
===
А1. [1]
А2. [2]
А3. [4]
А4. [3]
А5. [3]
А6. [1]
А7. [4]
А8. [2]
@ericbroska
ericbroska / cmm203.mm
Last active December 16, 2015 18:19
Code injection for CleanMyMac 2.0.3. Uses mach_override.
#include <objc/runtime.h>
#import <Security/Security.h>
#import <Security/SecCode.h>
#import <Security/SecRequirement.h>
#include "mach_override.h"
OSStatus CESStaticCodeCreateWithPath (CFURLRef path, SecCSFlags flags, SecStaticCodeRef *staticCode);
OSStatus CESStaticCodeCreateWithPath (CFURLRef path, SecCSFlags flags, SecStaticCodeRef *staticCode)
{
@ericbroska
ericbroska / 0readme.md
Last active December 15, 2015 22:59
Code injection for CleanMyMac 2.0.2

How to build this up and inject in the app yourself?

Note: you must have an Xcode to do all that stuff.

$ git clone https://github.com/andymatuschak/Sparkle.git MySparkleForInjection
$ cd MySparkleForInjection
$ open SUAppcast.m
(sure, you can use any other file with «.m» extension in there)

@ericbroska
ericbroska / AntiReceigenSec.m
Created March 16, 2013 06:02
Fake Security dylib that makes Receigen suck
// @ericbroska
// Fake Security dylib that makes Receigen suck
//
// Usage:
// ----------------------
// 1) compile this file:
// $ clang -dynamiclib -current_version 1.0.0 -compatibility_version 1.0.0 -Wl,-init,_m__n -framework Cocoa -framework Security -lcrypto -o .fakefakefakefakefakesecurity.dylib AntiReceigenSec.m
//
// 2) copy the generated «.fakefakefakefakefakesecurity.dylib» to, say, ./Target.app/Contents/Resources/
// (yes, you can choose any other path inside a target application's bunlde);
@ericbroska
ericbroska / 0readme.markdown
Last active December 12, 2015 06:49
«Easy hack» #2: fake geolocating for Tweetbot (OS X).

A simple way to specify fake longitude and/or latitude for your tweets in Tweetbot

  1. Download llocy.dylib from here or compile it yourself from sources (see the llocy.mm below).

  2. Move this llocy.dylib to any place on your disk. I've placed in ~/Library/Application Support/Tweetbot/llocy.dylib so I'm going to use this path in examples below.

  3. Close Tweetbot if you haven't done it yet.

  4. Open Terminal.app (/Application/Utilities/Terminal.app) and enter (or just copy-paste) this command (without $):

    $ DYLD_INSERT_LIBRARIES="~/Library/Application Support/Tweetbot/llocy.dylib" open -a Tweetbot --args 56.885752 -109.294739  
    

There you must change the path for llocy.dylib to your own, then replace 56.885752 and -109.294739 to your own latitude and longitude respectively.

@ericbroska
ericbroska / License.ttl
Last active April 9, 2017 18:29
Today's «Easy hack» is about The Tagger (http://deadbeatsw.com/). Just save this file as `License.ttl` and use it when «your trial period has expired» dialog pop-ups for the first time, so The Tagger won't annoy you anymore (^^,) Works for all versions up to 1.5.3 (the latest available).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Signature</key>
<string>Yep, this is not a `<data>` tag</string>
</dict>
</plist>
@ericbroska
ericbroska / vhx4.sh
Last active December 12, 2015 05:28
The simple way to reset available trial time of VirtualHostX application (3.x, 4.x)
#!/bin/sh
#
# Thanks @tylerhall for this tip
rm ~/Library/Application\ Support/VirtualHostX/". "
# you can also do some fun like this
# echo "99999999999999999999" > ~/Library/Application\ Support/VirtualHostX/". "
@ericbroska
ericbroska / null.m
Last active March 31, 2016 04:41
The simple way to make NSNull act as nil: to respond with `0` (==`nil`) to any message.
/*
clang -o null -framework Foundation null.m
ericbroska
*/
#import <Foundation/Foundation.h>
#include <objc/objc-class.h>
#include <objc/runtime.h>
int main(int argc, char const *argv[])
{