Skip to content

Instantly share code, notes, and snippets.

@taskylizard
taskylizard / fmhy.md
Last active October 22, 2025 06:25
/r/freemediaheckyeah, in one single file (view raw)
@htr3n
htr3n / ubuntu-installation.md
Last active January 18, 2023 01:30
Installing and setting a working Ubuntu box

Software Management

Ubuntu/Linux Tools

APT (Ubuntu's Advanced Packaging Tool)

# installing a package
sudo apt install zsh

System

ssh-keygen -t rsa -b 4096 -C "hoang.huy.tran@gmail.com"
  • Windows PowerShell was built upon .NET and only worked on Windows
  • PowerShell Core is open sourced and built on .NET Core 2.x, work on Windows, Linux, macOS, ARM
@htr3n
htr3n / macos-ramdisk.md
Last active August 18, 2025 15:03
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@cdleon
cdleon / macbook-pro-2011-defective-gpu-fix.md
Last active July 22, 2025 01:39
Macbook Pro 2011 GPU Defect fix macOS Sierra and High Sierra
@student020341
student020341 / sus.go
Created November 10, 2016 23:39
Script to suspend a computer when there has been no user activity for 30 minutes and there is no media playing.
package main
import (
"os/exec"
"strconv"
"time"
)
//determine if the user has been idle for a certain amount of time
func deadTime() bool {
@arvi
arvi / sublime-settings-osx.json
Last active March 28, 2022 06:07
Sublime Settings OSX
{
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": ".",
"selector": "source.js"
#!/bin/bash
# This script resizes all the images it finds in a folder (and its subfolders) and resizes them
# The resized image is placed in the /resized folder which will reside in the same directory as the image
#
# Usage: > ./batch_resize.sh
initial_folder="/your/images/folder" # You can use "." to target the folder in which you are running the script for example
resized_folder_name="resized"
all_images=$(find -E $initial_folder -iregex ".*\.(jpg|gif|png|jpeg)")
@bradp
bradp / setup.sh
Last active August 21, 2025 15:06
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install