Skip to content

Instantly share code, notes, and snippets.

commit b8a0ad2a9f5f756453961eeaa52550c95d58ecb6
gpg: Signature made Tue 02 Apr 2019 10:33:42 PM PDT
gpg: using RSA key F6CC1F4DF325EACBBE2532481F299543498470BA
gpg: issuer "justincapella@gmail.com"
gpg: Good signature from "Justin Capella <justincapella@gmail.com>" [ultimate]
Author: b1tninja <devnull@localhost>
Date: Tue Apr 2 22:33:42 2019 -0700
https:// for some sources
@b1tninja
b1tninja / access_ok.patch
Created March 7, 2019 17:32
New uaccess.h access_ok macro has no type parameter. This ignores one if given.
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index d82c78a79da5..7edb6ab268ad 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -38 +38,5 @@ static inline void set_fs(mm_segment_t fs)
-#define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
+#define __typed_access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size)) \
+ #warning uaccess.h access_ok macro no longer has a type parameter.
+#define __untyped_access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
+#define __get_access_ok(_1,_2,_3,NAME,...) NAME
# Maintainer: Tomás Pinho <me(at)tomaspinho(dot)com>
pkgname=rtl8821ce-dkms-git
_pkgbase=rtl8821ce
pkgver=1.0.0.r28.g960279a
pkgrel=2
pkgdesc="rtl8821CE driver with firmware"
arch=('i686' 'x86_64')
url="https://github.com/tomaspinho/rtl8821ce"
license=('GPL2')
fetch('https://www.archlinux.org/master-keys/').then(resp=>{
resp.text().then(html=>{
parser = new DOMParser();
doc = parser.parseFromString(html, "text/html");
xpath_result = doc.evaluate('//tr[th/text()]//a[contains(@href, "https://sks-keyservers.net/pks/lookup?op=vindex&fingerprint=on&exact=on&search=")]', doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE)
for (i = 0; i < xpath_result.snapshotLength; i++) {
a = xpath_result.snapshotItem(i);
fingerprint = (new URL(a.href,window.location)).searchParams.get('search');
developer = doc.evaluate('ancestor::tr/th/text()', a, null, XPathResult.STRING_TYPE).stringValue;
console.log(`${fingerprint} ${developer}`);
@b1tninja
b1tninja / PKGBUILD
Last active March 29, 2019 04:40
archlinux-packages-keyring
pkgname='archlinux-packages-keyring-git'
pkgver=0.g6541223ad07
pkgrel=1
#SOURCE_DATE_EPOCH=$(date -u '+%s')
arch=('any')
_arch_git=${archgit:-'https://git.archlinux.org/svntogit/packages.git'}
_keyserver=${keyserver:-'hkps://hkps.pool.sks-keyservers.net'}
arch=('any')
makedepends=('pacman' 'bash')
depends=('pacman')
#include <stdio.h>
#include <wchar.h>
#include <windows.h>
#include <tlhelp32.h>
#include <shlwapi.h>
#include <cstdarg>
//#include <Python.h>
typedef void PyObject;
//#include <pystate.h>
@b1tninja
b1tninja / glacier.py
Created March 23, 2016 03:50
Amazon Glacier Multipart Uploader
import datetime
import hashlib
import logging
import os
import bz2
from itertools import zip_longest
from socket import gethostname
from io import RawIOBase
import cryptography.hazmat
from xml.etree import ElementTree
import string
def parse(xml):
root = ElementTree.fromstring(xml)
return root.tag, tree_to_dict(root)
def tree_to_dict(element, parents=None):
import binascii
from enum import IntEnum
# class UniversalClassTags(IntEnum):
# sequence_of = 16
# set_of = 17
# numeric_string = 18
# printable_string = 19
# t61_string = 20
# videotex_string = 21
import evetypes
import stackless
#import uthread
import service
import session
from inventorycommon import const
from eve.client.script.ui.services.menuSvcExtras.movementFunctions import WarpToItem
from eve.common.script.sys.eveCfg import GetActiveShip
from eve.client.script.ui.shared.inventory.treeData import TreeDataShip