Skip to content

Instantly share code, notes, and snippets.

View alfg's full-sized avatar

Alfred Gutierrez alfg

  • NBCUniversal / PeacockTV
  • ☀️ Los Angeles, CA
  • 04:06 (UTC -07:00)
View GitHub Profile
@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active September 11, 2023 10:21
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@nstarke
nstarke / ecusim-2000.md
Created February 23, 2020 04:20
Car hacking with ScanTool ECUSim 2000

Car hacking with ScanTool ECUSim 2000

An upcoming project has me looking at car hacking at the moment. I watched a great video ( https://www.youtube.com/watch?v=nvxN5G21aBQ ) which caught me up to speed on the fundamentals. There are a few other videos out there on introductory car hacking, but they all seem to revolve around the virtual can interface provided by vcan. I decided I didn't want to test virtually because then I wouldn't know how to work with the actual connection hardware. At the same time, being a beginner, I DID NOT want to plug into my personal vehicle's ODB2 port.

I was looking for something between vcan and a real car. A little googling led me to the ScanTools ECUSim 2000: https://www.amazon.com/OBDLink-ScanTool-ECUsim-Simulator-Development/dp/B008NAH6WE

This board simulates a car. It has a ODB2 port for interfacing just like one would do with a

@sparrc
sparrc / install-ffmpeg.sh
Last active November 14, 2023 13:24
Installs ffmpeg with libaom and libx265 enabled for av1 and hevc encoding (tested on Ubuntu 16.04)
#!/usr/bin/env bash
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few
# other common libraries
# binary will be at ~/bin/ffmpeg
sudo apt update && sudo apt upgrade -y
mkdir -p ~/ffmpeg_sources ~/bin
export PATH="$HOME/bin:$PATH"
@martinruenz
martinruenz / ffmpeg-snippets.md
Last active November 15, 2022 06:39
ffmpeg snippets / cheatsheet
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 9, 2024 22:33
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@alfg
alfg / ffmpeg.txt
Created October 30, 2017 00:31 — forked from gildotdev/ffmpeg.txt
ffmpeg cli commands
## extract audio from .avi as .aac (conversion from another audio codec)
ffmpeg -i foo.avi -acodec aac -ab 128k -strict experimental bar.aac
## extract audio from .avi as .mp3 (no conversion, just copy)
ffmpeg -i foo.avi -acodec copy bar.mp3
## convert .mp3 to .aac
ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac
## extract single frame as image from .mp4
@tscholl2
tscholl2 / aes.go
Last active March 29, 2024 11:06
simple AES encryption/decryption example with PBKDF2 key derivation in Go, Javascript, and Python
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"
@alfg
alfg / golang_job_queue.md
Created July 3, 2017 20:49 — forked from harlow/golang_job_queue.md
Job queues in Golang