Skip to content

Instantly share code, notes, and snippets.

View seifscape's full-sized avatar
:octocat:

Seif Kobrosly seifscape

:octocat:
View GitHub Profile
@keith
keith / simctl-commands.txt
Last active December 7, 2022 23:27
All the subcommands of `xcrun simctl` (including ones that aren't listed in `simctl help`) LC_SOURCE_VERSION 776.1 (Xcode 13.0 beta 5)
addmedia
addphoto
addvideo
appinfo
boot
bootstatus
clone
create
darwinup
delete
import UIKit
import Combine
class ViewController: UITableViewController {
private let githubService: GithubService
private var cancellable: AnyCancellable?
private var repos: [Repo] = [] {
didSet {
tableView.reloadData()
}
@mecid
mecid / cia1.swift
Created June 19, 2019 12:08
Combine in action post's source code
import Foundation
import Combine
struct Repo: Decodable {
var id: Int
let owner: Owner
let name: String
let description: String
struct Owner: Decodable {
//
// ContentView.swift
// Layout
//
// Created by Matt Gallagher on 7/6/19.
// Copyright © 2019 Matt Gallagher. All rights reserved.
//
import SwiftUI
@craigeley
craigeley / add_instagram_to_contacts.scpt
Created May 23, 2019 14:10
This script takes the contents of your clipboard, allows you to search for a contact, and then adds an Instagram social media profile to that contact. Useful for use with the Vignette iOS app and the "Connections.json" file from the Instagram data dump.
set input to the clipboard as text
--whole process is in a loop to allow for user to research for contact
repeat
--need to find contact in order to update their info
try
display dialog "Enter name or company of contact to Instagram to:" default answer ""
set thePerson to text returned of result
end try
@mikoim
mikoim / README.md
Last active November 27, 2023 09:22
WireGuard example configuration for VPN

Server

iptables -A FORWARD -i wg0 -o YOUR_INTERFACE -s 10.200.200.0/24 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o YOUR_INTERFACE -s 10.200.200.0/24 -j MASQUERADE

systemd-networkd

see vpn.netdev and vpn.network.

@patrakov
patrakov / README
Last active February 5, 2025 03:24
Automatically reinstall OpenWRT packages after firmware upgrades
The script helps you restore all installed OpenWRT packages after upgrading the main firmware image via sysupgrade. It works
ONLY if the default firmware image provided by the OpenWRT project is sufficient to get connected to the Internet, but you
want some extra packages for additional functionality. In other words, it WILL NOT WORK if connecting to the Internet
requires installing extra packages (e.g., a kernel module for your LTE modem).
The script has been tested for upgrading from OpenWRT 18.06.1 to 18.06.2 and to a development snapshot, as well as between
development snapshots. On LEDE 17.01.x, "flock" is not a part of the default image, so has to be installed manually.
Initial setup:
@luanlmd
luanlmd / docker-compose.yml
Last active May 9, 2022 02:26
Mongo + ParseServer + Dashboard on Docker
version: '3'
services:
mongo:
image: mongo
ports:
- 27017:27017
volumes:
- ./data-db:/data/db

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@bamoo456
bamoo456 / download.py
Created August 8, 2018 00:35 — forked from mie00/download.py
pdf free books
# -*- coding: utf-8 -*-
import re
import urllib
from multiprocessing import Pool
import requests
import progressbar
CHUNK_SIZE = 1024 * 1024 # 1MB
def download(i):