Skip to content

Instantly share code, notes, and snippets.


Perceval Faramaz perfaram

Block or report user

Report or block perfaram

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
View CVE-2018-4150.c
* Dodgy POC for my CVE-2018-4150 bug - @cmwdotme
* Bad locking lets you use BIOCSDLT and race BIOCSBLEN to increase the length without
* increasing/reallocating the buffer.. which lets you overflow ;) Should work up to iOS 11.2.6
#include <fcntl.h>
#include <pthread.h>
aepryus / String+AE.swift
Created Mar 1, 2018
Swift String Extension for accessing Characters via Int; plus conversion to C
View String+AE.swift
// String+AE.swift
// Aepryus
// Created by Joe Charlier on 11/20/17.
// Copyright © 2017 Aepryus Software. All rights reserved.
import Foundation
eddieantonio /
Created Mar 30, 2017
Zero-dependency Python 3 and Node IPC using UNIX sockets
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import socket
import json
server_address = '/tmp/example.sock'
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
Bogidon / GrowingTextView.swift
Last active Sep 18, 2019
A UITextView subclass that grows with its text but allows scrolling according to AutoLayout constraints. Updates intrinsicContentSize. For an animatable version see
View GrowingTextView.swift
// GrowingTextView.swift
// Created by Bogdan Vitoc on 02/22/2017.
// Distributed under the MIT License:
import UIKit
Bogidon / AnimatedGrowingTextView.swift
Last active Aug 5, 2019
A short and understandable UITextView subclass that grows with its text. Animatable. Updates intrinsicContentSize. If you don't need animations check out
View AnimatedGrowingTextView.swift
// AnimatedGrowingTextView.swift
// Created by Bogdan Vitoc on 02/15/2017.
// Distributed under the MIT License:
import UIKit
jordanekay / Dictionary.swift
Last active Jan 19, 2020
Mapping dictionaries in Swift
View Dictionary.swift
extension Dictionary {
public func map<T: Hashable, U>(@noescape transform: (Key, Value) -> (T, U)) -> [T: U] {
var result: [T: U] = [:]
for (key, value) in self {
let (transformedKey, transformedValue) = transform(key, value)
result[transformedKey] = transformedValue
return result
preble / WeakSet.swift
Last active Dec 9, 2019
A pure Swift weak set.
View WeakSet.swift
// Created by Adam Preble on 2/19/15.
/// Weak, unordered collection of objects.
public struct WeakSet<T where T: AnyObject, T: Hashable> {
typealias Element = T
/// Maps Element hashValues to arrays of Entry objects.
/// Invalid Entry instances are culled as a side effect of add() and remove()
ryancdotorg /
Last active Feb 5, 2020
backdoored rsa key generation
#!/usr/bin/env python
import sys
import gmpy
import curve25519
from struct import pack
from hashlib import sha256
from binascii import hexlify, unhexlify
finalfantasia /
Last active Jan 22, 2020
Fixing Text Anti-aliasing in Fedora
  1. Add the RPMFusion repositories (both free and non-free) to the YUM repository directory (/etc/yum.repos.d/):
sudo dnf localinstall --nogpgcheck$(rpm -E %fedora).noarch.rpm$(rpm -E %fedora).noarch.rpm
  1. Install the patched version of FreeType with subpixel rendering enabled:
sudo dnf install -y freetype-freeworld
View KBCollectionExtensions.h
// KBCollectionExtensions.h
// Created by Guy English on 25/02/08.
// Copyright 2008 Kickingbear. All rights reserved.
#import <Cocoa/Cocoa.h>
You can’t perform that action at this time.