Skip to content

Instantly share code, notes, and snippets.

View nathantypanski's full-sized avatar
♥️

Nathan D. Typanski nathantypanski

♥️
View GitHub Profile
@nathantypanski
nathantypanski / malicious-sha256sums
Created December 4, 2024 18:03
solana web3.js IoCs
221953d91d4539fcb9641a82c0b115cc860725bcca0529ad7416a976695760bd index.esm.js.map
36eb8647b71c413fe967dc87dd00237f6643c9e0e6324323d225e98daaca35cb index.browser.cjs.js.map
3de3de1eb1a6554c04eb8e37a3225a6acc5eabf492e93955c02cf5f390bfa91d index.esm.js
6c3c7eea47c34a2013375ebcc93570467e34d54180c29a130f2a628a6ef04fc5 index.cjs.js
8532ce83938cf52c71124d89b39571bcaaa00e4b53466309e31ef66c1fee3805 index.browser.esm.js.map
8b5f9a18eac8b0f4e9f5d677b2a7240f8da92a2455637b9b41238e9ee4c9f772 index.iife.js.map
9ddc55b33bb110a8ce6ed13a89316695096715a55100818f87afe484478b8c70 index.cjs.js.map
a7dd7a649f528b0487983a25b1e03e17282a761f70275987b37f14b0f1b52349 index.native.js.map
ae6ffa6bb541ecc47b25e41b22b45241b011e1731b395796f522e653375344d6 index.iife.min.js
aeee34fb732f95a7fe68976d3af857b58e6dacfe0b879a829ffaf613b5d616e7 index.browser.esm.js
#include <MC9S08QE128.h>
#include "MCUinit.h"
void MCU_init(void)
{
SOPT1 = 0x42;
SPMSC1 = 0x1C;
SPMSC2 = 0x02;
SPMSC3 &= (unsigned char)~0x38;
if (*(unsigned char*far)0xFFAF != 0xFF) {
import sys
import os
# maximum file descriptors to close if sysconf(SC_OPEN_MAX)
# is indeterminate
BD_MAX_CLOSE = 8192
def become_daemon(no_umask0=False,
no_chdir=False,
no_close_open_files=False,
# See AUR interface for current maintainer.
#
# See <https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg00005.html>
# for the start of the discussion on why emacs development moves to git.
#
# See <https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg00015.html>
# for the actual community proposal about moving to git with RMS's blessing.
#
# TIP: Don't run this on a tmpfs unless you have oodles of RAM.
#[deriving(Show)]
struct Node {
value: uint,
left: Option<Box<Node>>,
right: Option<Box<Node>>,
}
impl Node {
fn new(val: uint) -> Box<Node> {
@nathantypanski
nathantypanski / dynamic-streaming.rs
Created August 15, 2014 00:24
dynamic page streaming
fn respond_with_dynamic_page(stream: Option<std::io::net::tcp::TcpStream>, path: &Path) {
let mut stream = stream;
let mut file_reader = File::open(path).expect("Invalid file!");
stream.write(HTTP_OK.as_bytes());
let begin_comment : ~[u8] = "<!--#exec cmd=\"".bytes().collect();
let end_comment : ~[u8] = "\" -->".bytes().collect();
SRCDIR = src
PROGRAM_NAME = myprog
all: $(PROGRAM_NAME)
.PHONY: clean $(PROGRAM_NAME)
$(PROGRAM_NAME): $(SRCDIR)/$(PROGRAM_NAME).rs
rustc -L. $(SRCDIR)/$(PROGRAM_NAME).rs
#[feature(macro_rules)];
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
macro_rules! expr (($e: expr) => { $e })
macro_rules! spawn {
($($code: block)*) => {
expr!(spawn(proc() {$($code)*}))
}
@nathantypanski
nathantypanski / truecrypt.diff
Created June 19, 2014 21:50
Truecrypt diff from the goodbye message appearance
diff --recursive -bu truecrypt-7.1a-source/Boot/Windows/BootMain.cpp truecrypt-7.2-source/Boot/Windows/BootMain.cpp
--- truecrypt-7.1a-source/Boot/Windows/BootMain.cpp 2012-02-07 11:36:48.000000000 +0100
+++ truecrypt-7.2-source/Boot/Windows/BootMain.cpp 2014-05-27 18:36:02.000000000 +0200
@@ -75,7 +75,9 @@
#endif // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- PrintEndl (3);
+ PrintEndl (2);
+ Print ("WARNING: Using TrueCrypt is not secure");
@nathantypanski
nathantypanski / gist:b9d2d453718a22765f5c
Created June 17, 2014 04:56
uses of find_linkage_metas in rust
09967665eaa5ca3d259f0f59ef26c8d236bf47a7:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
b9adb6c717627ab6dcc9298b79a8d44cfe2fc616:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
375c5b884fd41e637bf0eff6d58c16cc18b179a9:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
56d7bbe2637933455249fc3c73f510ab3ef97a29:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
6dd6ddd9b9b7bbae9d7e436ddd777729a019c4c6:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
f4ae8a83f9e56a7f16a5f0a25d22c74063e2fb5e:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
e1971dd35a679ff8fc438f7ccb8d6754de472d6e:src/libsyntax/attr.rs:pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
ebac770abb529ebdd1b9de830ee82069d4f754da:src/libsyntax/attr.rs:pub fn find_linkage_metas(attr