Skip to content

Instantly share code, notes, and snippets.

@zcot
zcot / 40_custom
Created June 28, 2020 02:54
.iso boot from grub menu, written in /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Mint 20 .iso' {
set isofile='/home/zcot/Downloads/linuxmint-20-xfce-64bit-beta.iso'
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
# FIRMWARE SECTION:
install git software package:
$ apt install git
Clone the git repository with:
$ git clone https://github.com/patjak/facetimehd-firmware.git
change to this new clone facetime directory:
$ cd facet[PRESS TAB KEY FOR AUTOCOMPLETE NAME]
@zcot
zcot / rotatevid
Last active May 26, 2018 16:16
Create rotated version of a video using vlc...
#!/bin/bash
#1. save this entire file to current directory as a file named rotatevid
#2. then make it executable from current directory with command: chmod +x rotatevid
#3. then run a conversion in current directory with command like this: ./rotatevid yourfilename.mp4
#4. the converted file will be called OutputFile.mp4 in current directory
#
# Options for --transform-type below are: 90,180,270,hflip,vflip
vlc --no-repeat --no-loop -I dummy $1 --transform-type=270 --sout="#transcode{vfilter=transform}:std{access=file,mux=mp4,dst=OutputFile.mp4}" vlc://quit
@zcot
zcot / -
Created September 26, 2017 05:13
System: Host: matthew-2016 Kernel: 4.10.0-24-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Xfce 4.12.3 (Gtk 2.24.28) dm: mdm
Distro: Linux Mint 18.1 Serena
Machine: Mobo: MSI model: K9N6PGM2-V2 (MS-7309) v: 2.0
Bios: American Megatrends v: V10.6 date: 10/27/2011
CPU: Quad core AMD Athlon II X4 630 (-MCP-) cache: 2048 KB
flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 22503
clock speeds: min/max: 800/2800 MHz 1: 800 MHz 2: 800 MHz
3: 1600 MHz 4: 1600 MHz
Graphics: Card: NVIDIA G71 [GeForce 7950 GT]
@zcot
zcot / pastebin
Last active September 27, 2017 01:40
/usr/bin/pastebin-vs-/usr/local/bin/pastebin
#!/usr/bin/python3
import sys
import os
import stat
import subprocess
content = ""
mode = os.fstat(0).st_mode