Skip to content

Instantly share code, notes, and snippets.

@mimoo
mimoo / linear_approx_table.py
Last active May 10, 2024 17:21
calculate linear approximation tables for Sboxes
import sys
# sbox from the tutorial
#sbox = [0xe, 4, 0xd, 1, 2, 0xf, 0xb, 8, 3, 0xa, 6, 0xc, 5, 9, 0, 7]
sbox = [0xf, 3, 0xa, 6, 4, 1, 0xb, 9, 0xe, 5, 0, 0xd, 2, 0xc, 7, 8]
SIZE_SBOX = len(sbox)
# compute the linear approximation for a given "input = output" equation
def linearApprox(input_int, output_int):
total = 0
@zhangyoufu
zhangyoufu / certs.txt
Created March 7, 2024 10:47
A configuration profile needed by VirtualBox VBoxHeadless, signed by Apple, valid for 18 years, grants several entitlements
% openssl pkcs7 -print_certs -text -in embedded.provisionprofile -inform der
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 134752589830791184 (0x1debcc4396da010)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
Validity
Not Before: Feb 7 21:48:47 2013 GMT
Not After : Feb 7 21:48:47 2023 GMT
@zhangyoufu
zhangyoufu / apple_pki_attribute.txt
Created January 10, 2022 06:06
Apple PKI attributes (incomplete)
1.2.840.113635.100.6.1 Leaf Certificate
1.2.840.113635.100.6.1.2 iOS Development
1.2.840.113635.100.6.1.3 iOS App Store Application
1.2.840.113635.100.6.1.4 iOS Distribution
1.2.840.113635.100.6.1.6 iOS App Store VPN Application
1.2.840.113635.100.6.1.7 3rd Party Mac Developer Application
1.2.840.113635.100.6.1.8 3rd Party Mac Developer Installer
1.2.840.113635.100.6.1.9 Mac App Store Application
1.2.840.113635.100.6.1.10 Mac App Store Installer
1.2.840.113635.100.6.1.11 Mac App Store Receipt
@tenpoku1000
tenpoku1000 / AC_2017-12-06.md
Last active May 10, 2024 17:18
自作 OS の GUI 開発のためのメモ

自作 OS の GUI 開発のためのメモ

2024/04/20 更新

この記事は、自作OS Advent Calendar 2017の 12/6 の記事として書かれました。

主に、ライブラリや仕様書のダウンロード・サイトやリポジトリなどの URL を集めてみました。この他の URL は、以下でブックマークを公開していますので、興味がある方は参照してみてください。

@aferreira44
aferreira44 / fix-permission.sh
Created February 10, 2018 01:32
Arduino IDE error: ser_open(): can't open device "/dev/ttyUSB0": Permission denied
#!/bin/bash
sudo usermod -a -G dialout andre
sudo chmod a+rw /dev/ttyUSB0
@kylemcdonald
kylemcdonald / function-calling.ipynb
Created June 14, 2023 01:10
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OrionReed
OrionReed / dom3d.js
Last active May 10, 2024 17:16
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@chranderson
chranderson / nvmCommands.js
Last active May 10, 2024 17:16
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@rapinsa
rapinsa / block_gc.txt
Last active May 10, 2024 17:16 — forked from MewX/block_gc.txt
Block Adobe Hosts C:\drivers\etc\hosts
For anyone who might read this in the future, I've found the best solution to this problem. For some reason I didn't need to go through all these steps on my surface pro adobe programs, but my desktop gave me issues. So if you're still having issues after doing the following, read on.
If you just end the process in Task Manager, the pop-up comes back up eventually.
If you just delete the files in "C:\Program Files (x86)\Common Files\Adobe\AdobeGCClient" or the folder itself, they may just recreate themselves every day or two.
If you delete/disable the Adobe services or schedules in Task Scheduler, those may just come back too.
To solve these issues, I decided to make a .bat file that deletes every file in that AdobeGCClient folder (exact location may depend on your Adobe install folder) and schedule it to do this every time I log on/turn on my pc. So far that has worked for the past few days.
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 10, 2024 17:12
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'