This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import notify2 | |
import dbus | |
from gi.repository import GLib | |
from dbus.mainloop.glib import DBusGMainLoop | |
import yubico | |
def check(bus, msg): | |
if msg.get_path() != "/ScreenSaver": | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "" >>/media/removable/boot/config.txt | |
echo "enable_uart=1" >>/media/removable/boot/config.txt | |
touch /media/removable/boot/ssh | |
cat >/media/removable/boot/wpa_supplicant.conf <<EOF | |
country=CN | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="dd-wrt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SPDX-License-Identifier: GPL-2.0 */ | |
#ifndef __BPF_HELPERS_H | |
#define __BPF_HELPERS_H | |
/* helper macro to place programs, maps, license in | |
* different sections in elf_bpf file. Section names | |
* are interpreted by elf_bpf loader | |
*/ | |
#define SEC(NAME) __attribute__((section(NAME), used)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 84a933323d59b27ae85cf16deddc254a0b17e450 Mon Sep 17 00:00:00 2001 | |
From: Shraddha Chaudhari <Shraddha.Chaudhari@imgtec.com> | |
Date: Tue, 5 Jan 2016 11:16:43 +0530 | |
Subject: mtd: spi-nor: add support for winbond OTP | |
Few winbond spi nor devices support 3 x 256 bytes | |
of security registers, add support for read, write, lock | |
of these registers as user OTP. | |
Also add support for reading winbond devices unique ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/random.h> | |
int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) { | |
// ... | |
// after mutex_init(&nor->lock); | |
if(memcmp(info->id, "\xef\x40\x18", 3) == 0) { | |
int ret; | |
u8 buf[4+8]; // 4 dummy + 64-bit ID | |
dev_warn(dev, "reading unique ID\n"); | |
ret = nor->read_reg(nor, 0x4B, buf, sizeof(buf)); // Read Unique ID number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// bash -c 'CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o clean clean.go' | |
// Usage: | |
// bandersnatch -c /tmp/b.conf verify --delete --dry-run &>verify-dry-run.log | |
// ./clean <verify-dry-run.log >clean.log | |
import ( "fmt";"log"; "os"; "time";"bufio";"strings" ) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MipselNoneElfBinutils < Formula | |
desc "FSF Binutils for mipsel cross development" | |
homepage "https://www.gnu.org/software/binutils/" | |
url "https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.gz" | |
sha256 "9b0d97b3d30df184d302bced12f976aa1e5fbf4b0be696cdebc6cca30411a46e" | |
def install | |
system "./configure", "--target=mipsel-none-elf", | |
"--disable-multilib", | |
"--disable-nls", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************** from pn53x-internal.h **********/ | |
// Register addresses | |
#define PN53X_REG_Control_switch_rng 0x6106 | |
#define PN53X_REG_CIU_Mode 0x6301 | |
#define PN53X_REG_CIU_TxMode 0x6302 | |
#define PN53X_REG_CIU_RxMode 0x6303 | |
#define PN53X_REG_CIU_TxControl 0x6304 | |
#define PN53X_REG_CIU_TxAuto 0x6305 | |
#define PN53X_REG_CIU_TxSel 0x6306 | |
#define PN53X_REG_CIU_RxSel 0x6307 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>libccid.dylib</string> | |
<key>CFBundleIdentifier</key> | |
<string>org.debian.alioth.pcsclite.smartcardccid</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.set noreorder | |
.set noat | |
.globl __start | |
.text | |
__start: | |
li $s0, 0x80100000 | |
li $s1, 0 | |
li $s2, 1 | |
lw $a1, 4($s0) # selection | |
lw $a2, 8($s0) # random |