Skip to content

Instantly share code, notes, and snippets.

@jtexp
jtexp / 1001-f.json
Created March 1, 2017 21:48
ndb 1001-f
{
"report": {
"sr": "28",
"sources": [
{
"authors": "Food and Drug Administration (FDA), DHHS",
"title": "FDA Total Diet Study",
"year": "1995",
"id": 1,
"iss": "",
@jtexp
jtexp / 45244239.json
Created March 1, 2017 21:46
ndb branded sample
{
"report": {
"sr": "January, 2017",
"type": "Basic",
"food": {
"name": "KINGS COMMAND FOODS FULLY COOKED 0.5 OUNCE MEATBALLS 2-5 POUND BAGS PER 10 POUND NET WEIGHT MASTER CASE., UNPREPARED, GTIN: 10088374001356",
"ds": "GDSN",
"ing": {
"desc": "BEEF, WATER, ONIONS, TEXTURED VEGETABLE PROTEIN (SOY FLOUR, CARAMEL COLOR), BREADCRUMBS (BLEACHED WHEAT FLOUR, SUGAR, SALT, YEAST, CANOLA OIL), SOY PROTEIN CONCENTRATE, SEASONING (SALT, CORN SYRUP SOLIDS, CORN STARCH, CHICKEN FAT, SUGAR, DEHYDRATED ONION, ARTIFICIAL FLAVOR, TURMERIC, SPICES, DISODIUM INOSINATE, DISODIUM GUANYLATE, SPICE EXTRACTIVES, SILICON DIOXIDE), SEASONING (DEXTROSE, SALT, SPICES, DEHYDRATED ONION, SPICE EXTRACTIVES), EGG WHITES, GROUND MUSTARD.",
"upd": "01/03/2017"
@jtexp
jtexp / proposal.md
Last active June 3, 2016 03:15
lug streaming

lug streaming setup

hardware:

  • streaming laptop
  • hdmi cloner
  • hdmi to usb3 device
  • web cam
179 | | 2016-01-29 19:05 | E, I, O, U | 390 EE
178 | | 2016-01-23 21:26 | Update | 12 EE
177 | | 2016-01-21 16:47 | Install | 1
176 | | 2016-01-21 16:45 | E, I, U | 60 EE
175 | | 2016-01-18 12:42 | Install | 1
174 | | 2016-01-18 12:29 | Install | 1
173 | | 2016-01-18 10:19 | Install | 3
172 | | 2016-01-18 10:12 | Install | 14
171 | | 2016-01-17 14:18 | Install | 101 EE
170 | | 2016-01-16 19:01 | Update | 75 EE
LSI 9211-8i flashed to IT mode.
1. Get sas2flash.efi, current IT firmware and current BIOS from LSI web site
2. Put those on ordinary USB flash drive, and plug USB flash drive into computer
3. Do not boot from flash drive, but select UEFI boot from boot selector, which is f11 on SuperMicros
4. Select USB drive; type "map" in UEFI boot to show drives; mine was fs0, so I typed "fs0:" at UEFI prompt
5. Type "sas2flash -o -e 6" to erase most of the flash. Do not use erase level 7.
6. Type "sas2flash -o -f 2118it.bin -b mptsas2.rom" or the current versions to replace the firmware and BIOS. Watch progress on screen.
7. Type "sas2flash -list" to see upgraded versions
openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero | pv --progress --eta --rate --bytes | dd of=/dev/sda bs=512 count=5860533134 seek=34
\documentclass[a4paper,12pt]{article}
% \implies is proper, but I like the look of \to better
% you can comment out this line, and everything will change
\newcommand{\implies}{\to}
% for some reason its not working on iff. Changed manually
\newcommand{\leftrightarrow}{\leftrightarrow}
\usepackage{verbatim}
\usepackage{colortbl}
@jtexp
jtexp / gist:4985bbc06b465b0d90d7
Created September 10, 2015 05:26
bs2b crossfeed on gst-1.4.5
change
./configure
GST_REQ=1.4.5
GSTPB_REQ=1.4.5
cd ./ext/bs2b
make
cd ./.libs/
mv bs2b .so to .. /lib64/gstreamer-1.0
@jtexp
jtexp / gist:84864a1c3987238eaefd
Created August 22, 2015 23:02
seagate 8tb failure
[ 1670.020298] sdc: sdc1
[ 1671.456883] sdc: sdc1
[ 2326.627882] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
[ 2714.601332] ata4.00: exception Emask 0x0 SAct 0x3fffff00 SErr 0x0 action 0x6 frozen
[ 2714.604495] ata4.00: failed command: WRITE FPDMA QUEUED
[ 2714.607081] ata4.00: cmd 61/c0:40:80:fc:90/3a:00:03:00:00/40 tag 8 ncq 7700480 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 2714.613744] ata4.00: status: { DRDY }
[ 2714.615457] ata4.00: failed command: WRITE FPDMA QUEUED
[ 2714.617773] ata4.00: cmd 61/00:48:40:37:91/16:00:03:00:00/40 tag 9 ncq 2883584 out
@jtexp
jtexp / gist:0a797496fd4b3bfdc741
Created August 22, 2015 22:51
openssl rand stream
sudo openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero | pv --progress --eta --rate --bytes --size 8000632782848 | dd of=/mnt/st/file.test bs=10M