Skip to content

Instantly share code, notes, and snippets.

@mpasternacki
mpasternacki / freebsd_on_mbp.md
Created January 23, 2015 17:12
FreeBSD on a MacBook Pro

FreeBSD on a MacBook Pro

Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki

@rummanwaqar
rummanwaqar / stm32_install.bash
Last active February 24, 2016 15:22
STM32 Setup
sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
sudo apt-get update -q
sudo apt-cache policy gcc-arm-none-eabi
# Remove the offical packages
apt-get purge -y binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi
#install GNU ARM Embedded Toolchain
apt-get update -q && apt-get install -y build-essential unzip \
git binutils-arm-none-eabi \
gcc-arm-none-eabi libnewlib-arm-none-eabi \
@xaviervia
xaviervia / client.js
Created June 17, 2015 17:19
Remote REPL with WebSockets
(function (window) {
'use strict'
var Socket = function (url) {
this.url = url || 'ws://localhost:10001'
this.connect()
}
Socket.prototype.connect = function () {

Last updated: 2015-08-11

Searching for Files

Find mp3 in a directory that are multipart album but not in CD[0-9] folder

exiftool -partofset -directory -filename -r -if '$partofset =~ /^\d\/\d$$/ and $directory =~ /(?<!\d)$$/i and $filetype eq "MP3"' .

Find images in a directory that don't have a DateTimeOriginal

@joepie91
joepie91 / .md
Last active March 17, 2023 18:42
Nix in multi-user mode on a non-NixOS (eg. Debian) system

This post is deprecated!

Its contents have been moved to the NixOS wiki here, where they are being kept up to date. Please follow the instructions there instead!

The original post is below for posterity.

 

 

Installed Packages
NetworkManager.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-tui.x86_64 1:1.0.6-27.el7 @anaconda
NetworkManager-wifi.x86_64 1:1.0.6-27.el7 @anaconda
acl.x86_64 2.2.51-12.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda
alsa-firmware.noarch 1.0.28-2.el7 @anaconda
alsa-lib.x86_64 1.0.28-2.el7 @anaconda
alsa-tools-firmware.x86_64 1.0.28-2.el7 @anaconda
@thacoon
thacoon / arch-linux-gnome-install
Last active March 22, 2025 06:30
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger
# I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste
# It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c)
# Some useful services
pacman -S acpid ntp dbus cups cronie
@soshial
soshial / template.xml
Last active June 1, 2018 12:26
ABBYY FineReader HotFolder template *.fta file
<?xml version="1.0"?>
<scenarios xmlns="http://www.abbyy.com/FineReader/Shell/TaskAutomation/0">
<scenario name="Моя задача111">
<operation operationType="UseBatch" mode="loadOptions" batchOrOptionsPath="" checkAfterExecute="false"
optionsMode="loadOptions">
<batchOptions xmlns="http://www.abbyy.com/FineReader/BatchOptions/0" hasLanguageDataBase="false">
<ocr options="OCRO_DetectTables,OCRO_DetectPictures" textType="STT_Normal" hilightLevel="SBEHL_Thorough"
patternName="(Default)" patternMode="UPM_DontUseUserPattern">
<language type="" languages="French,RussianOldSpelling"/>
</ocr>
@qffdn
qffdn / mpkdec.c
Created July 15, 2017 06:11
Microsoft/Windows product key decoder
/*
* Copyright (c) 2017 Donald Smith <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@douglasmiranda
douglasmiranda / core-os-install.md
Last active October 7, 2024 19:29
Installing CoreOS on my old laptop