This file contains hidden or 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
#!/bin/bash | |
# Don't forget to read the SECURITY WARNING below, and then don't | |
# say you didn't know. | |
####### | |
## Description | |
# | |
# tl;dr -- Type `e filename` on a remote host via ssh and your local | |
# emacs will open the remote file. Don't have the `e` function |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys | |
import itertools | |
def three_passes_and_storage(): | |
# Read file and split each line into fields (by whitespace) | |
with open(sys.argv[1]) as f: | |
lines = [line.split() for line in f.readlines()] | |
# Check that each line has the same number of fields |
This file contains hidden or 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
def test(counter=[0], bits=[], stop=24): | |
if len(bits) == stop: | |
print(*bits, ' ', counter[0]) | |
counter[0] += 1 | |
return | |
bits.append(0) | |
test(counter, bits) | |
bits[-1] = 1 | |
test(counter, bits) | |
bits.pop() |
This file contains hidden or 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
########################################################################### | |
########################################################################### | |
########################################################################### | |
U-Boot SPL 2015.04-g85edf72 (Nov 30 2015 - 09:12:48) | |
Booting from NAND | |
PMIC: LTC3676 | |
NAND : 256 MiB | |
*** Warning - bad CRC, using default environment |
This file contains hidden or 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 itertools import izip, islice | |
import random | |
def sumdiff(data): | |
return ((x + y, x - y) for x, y in data) | |
def combined_file_data(files): | |
for i,n in files: | |
# Generate some data. | |
x = range(n) |
This file contains hidden or 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
#!/usr/bin/env python | |
# Copyright (C) 2015 Harvey Chapman <[email protected]> | |
# Public Domain | |
# Use at your own risk. | |
""" | |
Splits a gpx file with breaks in the track into separate files. | |
Based on: http://stackoverflow.com/q/33803614/47078 |
This file contains hidden or 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
silver:2015 June hchapman$ ffmpeg -i BeerDemo_h264_aac.mp4 -c:v h264 -an OUTPUT.mp4 | |
ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers | |
built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.7.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libcaca --enable-vda | |
libavutil 54. 27.100 / 54. 27.100 | |
libavcodec 56. 41.100 / 56. 41.100 | |
libavformat 56. 36.100 / 56. 36.100 | |
libavdevice 56. 4.100 / 56. 4.100 | |
libavfilter 5. 16.101 / 5. 16.101 | |
libavresample 2. 1. 0 / 2. 1. 0 |
This file contains hidden or 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
<6>[ 16.348681] sd 0:0:0:0: [sda] Unhandled sense code | |
<6>[ 16.353485] sd 0:0:0:0: [sda] | |
<4>[ 16.356629] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE | |
<6>[ 16.362206] sd 0:0:0:0: [sda] | |
<4>[ 16.365349] Sense Key : Medium Error [current] | |
<6>[ 16.369911] sd 0:0:0:0: [sda] | |
<4>[ 16.373057] Add. Sense: Unrecovered read error | |
<6>[ 16.377516] sd 0:0:0:0: [sda] CDB: | |
<4>[ 16.381006] Read(10): 28 00 00 05 57 09 00 00 f0 00 | |
<3>[ 16.386050] end_request: critical target error, dev sda, sector 349961 |
This file contains hidden or 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
#### Demo Commands | |
mw.b ${loadaddr} 0 10 | |
md.b ${loadaddr} 10 | |
i2c bus 0 | |
i2c read 0x51 0xDF.1 1 $loadaddr | |
md.b ${loadaddr} 10 | |
setexpr.b recovery *$loadaddr | |
echo $recovery |
This file contains hidden or 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
mm () | |
{ | |
if [ -f build/core/envsetup.mk -a -f Makefile ]; then | |
make $@; | |
else | |
T=$(gettop); | |
local M=$(findmakefile); | |
local MODULES=; | |
local GET_INSTALL_PATH=; | |
local ARGS=; |