Skip to content

Instantly share code, notes, and snippets.

View JFKingsley's full-sized avatar

Jonathan JFKingsley

View GitHub Profile
@daraosn
daraosn / drone_swarm.sh
Last active April 15, 2017 02:03
Hack to connect multiple Parrot AR Drone 2.0 and create a swarm
## Hack to connect multiple Parrot AR Drones.
#############################################
## Instructions:
## 1. Connect to your AR Drone wifi network.
## 2. Open your terminal and do 'telnet 192.168.1.1'
## 3. Copy the script and replace DRONE_ID with the desired ID number (between 3-255).
## 4. Paste and run the script for every drone on the swarm.
DRONE_ID=200
sed -i "s/PROBE=1/PROBE=${DRONE_ID}/" /bin/wifi_setup.sh
@jdiaz5513
jdiaz5513 / ascii_arty.py
Last active December 30, 2023 02:32
Console ASCII Art Generator
#! /usr/bin/env python2
# Requires: PIL, colormath
#
# Improved algorithm now automatically crops the image and uses much
# better color matching
from PIL import Image, ImageChops
from colormath.color_conversions import convert_color
from colormath.color_objects import LabColor
from colormath.color_objects import sRGBColor as RGBColor
if (cluster.isMaster)
cluster.fork() for i in [0...numCPUs]
else
@server = http.createServer(@onRequest)
@io = socketio.listen(@server, collectedOptions)
@io.sockets.on 'connection', @onConnection
@server.listen @port, cb
@CodaFi
CodaFi / aviary.m
Last active May 5, 2023 12:09
I know why the caged bird sings.
// cc aviary.m -o aviary -framework Foundation -fobjc-arc && ./aviary
#import <Foundation/Foundation.h>
// use it like lambda(…args…)(…return value…)
#define lambda(...) \
^ (__VA_ARGS__) _lambda_body
#define _lambda_body(...) \
{ return __VA_ARGS__; }
@brendanashworth
brendanashworth / gist:3ff908eaf695f834fb60
Last active March 26, 2016 05:24
Every single *File that exists in these different language/libraries...
Podfile
Capfile
Gemfile
Gomfile
Makefile
Thorfile
Cakefile
Caskfile
Jakefile
Doxyfile
// Load `*.js` under current directory as properties
// i.e., `User.js` will become `exports['User']` or `exports.User`
require('fs').readdirSync(__dirname + '/').forEach(function(file) {
if (file.match(/.+\.js/g) !== null && file !== 'index.js') {
var name = file.replace('.js', '');
exports[name] = require('./' + file);
}
});
@ddz
ddz / ios_lockdown_diag_services.md
Last active May 12, 2023 15:14
iOS Lockdown Diagnostic Services

TL;DR

  • Pairing an iOS device to a host (computer running iTunes) gives that host significant access to data on the iOS device and requires connecting the unlocked iOS device to a host over USB
  • Once paired, that host (or another host that has stolen its pairing record) can access significant amounts of user personal data from the iOS device over USB and Wi-Fi through the com.apple.mobile.file_relay and com.apple.mobile.house_arrest lockdown services
  • These services will not return user data files that are encrypted and locked by iOS Data Protection but the files returned by file_relay are not protected by iOS Data Protection and do include significant amounts of personal user data that would otherwise be encrypted in iTunes encrypted backups ("Encrypt Backup" is enabled)
  • The com.apple.mobile.file_relay service is not used or referenced by any public Apple software so its intended client software is unknown outside of Apple
  • Apple released a [Knowledge Base article](https://support.apple.co
@imkevinxu
imkevinxu / Device.swift
Last active March 4, 2023 16:09
iOS device checks for OS version and screen size in Swift
//
// Device.swift
// imHome
//
// Created by Kevin Xu on 2/9/15. Updated on 6/20/15.
// Copyright (c) 2015 Alpha Labs, Inc. All rights reserved.
//
import Foundation
@imkevinxu
imkevinxu / vidtogif.sh
Last active June 17, 2016 17:35
Convert an animated video to gif from http://chrismessina.me/b/13913393/mov-to-gif
# Convert an animated video to gif
# Works best for videos with low color palettes like Dribbble shots
#
# @param $1 - video file name like `animation.mov`
# @param @optional $2 - resize parameter as widthxheight like `400x300`
#
# Example: vidtogif animation.mov 400x300
# Requirements: ffmpeg and gifsicle. Can be downloaded via homebrew
#
# http://chrismessina.me/b/13913393/mov-to-gif
@0xabad1dea
0xabad1dea / severscam.md
Last active July 12, 2021 01:32
Sever Scam

The Scammiest Scam To Yet Anonymity Scam

I'm still holding out for this being a hoax, a big joke, and that they're going to cancel the kickstarter any minute. It'd be quite the cute "lessons learned" about anonymity scams. However, I will be treating it from here on out as a genuine scam. (As of May 2nd, the kickstarter has been cancelled, after the strangest attempt to reply to this imaginable. Good riddance.)

This absolutely ridiculous thing was brought to my attention by a friend and since it was late at night I thought I must be delirious in how absurdly over the top fake it seemed. So I slept on it, woke up, and found that it had gotten a thousand dollars more funding and was every bit as flabbergasting as I thought it was.

Since I realize that not everyone has spent their entire lives studying computers – and such people are the targets of such scams –