Skip to content

Instantly share code, notes, and snippets.

View dezgeg's full-sized avatar

Tuomas Tynkkynen dezgeg

  • Helsinki, Finland
View GitHub Profile
@dezgeg
dezgeg / CrashPassword.cpp
Created June 26, 2014 17:21
Crash Bandicoot (NTSC-U) password checksum
#include <stdint.h>
#include <stdio.h>
typedef int32_t Word; // shift instruction does srav
enum {
CIR,
SQU,
EXS,
TRI,

Please publicly post the following Gist, and name it keybase.md:

Keybase proof

I hereby claim:

  • I am dezgeg on github.
  • I am dezgeg (https://keybase.io/dezgeg) on keybase.
  • I have a public key whose fingerprint is 7D69 9DDD 1CBE 52F2 104A 0169 5F47 ECE0 2178 1149
#!/bin/bash
cd "$(dirname "$0")"
if ! [ -f csv.zip ]; then
echo "Downloading data." >&2
wget http://pilvilinna.cert.fi/opendata/autoreporter/csv.zip
fi
echo "Incident category frequencies:"
unzip -c csv.zip 2>/dev/null | grep -v '^#' | cut -d'|' -f6 | sort | uniq -c | perl -pe 's/^ *(\d+) (.*)$/$2 $1/'
use Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = '1.0';
%IRSSI = (
authors => 'Tuomas Tynkkynen',
contact => 'dezgeg@gmail.com',
name => 'noawaymsg',
description => 'Ignore useless messages on /away',
license => 'GPLv2',
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
struct Foo {
asd: Option<String>,
}
fn doit(foos: &Vec<Foo>) {
for foo in foos.iter() {
let cloned: Foo = *(foo.clone()); // <--
}
}
diff --git arch/arm/boot/dts/tegra124.dtsi arch/arm/boot/dts/tegra124.dtsi
index 6e6bc4e..aa8753a 100644
--- arch/arm/boot/dts/tegra124.dtsi
+++ arch/arm/boot/dts/tegra124.dtsi
@@ -613,6 +613,8 @@
<&tegra_car TEGRA124_CLK_PLL_U>,
<&tegra_car TEGRA124_CLK_USBD>;
clock-names = "reg", "pll_u", "utmi-pads";
+ resets = <&tegra_car 59>, <&tegra_car 22>;
+ reset-names = "usb", "utmi-pads";
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index d675186..5b14d79 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -643,6 +643,8 @@
<&tegra_car TEGRA124_CLK_PLL_U>,
<&tegra_car TEGRA124_CLK_USBD>;
clock-names = "reg", "pll_u", "utmi-pads";
+ resets = <&tegra_car 22>, <&tegra_car 22>;
+ reset-names = "usb", "utmi-pads";
@dezgeg
dezgeg / gist:27dc818851e301d8058a
Created May 6, 2015 09:23
NixOS on Jetson TK1
U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)
U-Boot 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 - 14:29:15)
TEGRA124
Board: NVIDIA Jetson TK1
I2C: ready
DRAM: 2 GiB
MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1
@dezgeg
dezgeg / gist:e364bbf9f513b7f222e6
Created May 6, 2015 11:10
Initial bootstrap configuration.nix
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
gitMinimal
psmisc # killall
tree
];
networking.domain = "dezgeg.me";
networking.firewall.enable = false;