Skip to content

Instantly share code, notes, and snippets.

@erikvip
erikvip / cygwinlist.md
Last active April 4, 2024 12:26
Import/Export Cygwin List of installed packages

Import & Export Cygwin List of installed Packages

If you want to go from 32 to 64 bit Cygwin but keep all the packages[1], you might find yourself in a spot where you would like to export the list of cygwin packages and also be able to install cygwin with all these packages again. I will tell you how. Open your Cygwin shell and enter

cygcheck -c -d | sed -e "1,2d" -e 's/ .*\$//' > packagelist

This will simply dump a list of installed packages. To install Cygwin 64 with these packages selected, download setup-x86_64[2] and execute it with the command line parameters

./setup-x86_64 -P `awk 'NR==1{printf \$1}{printf ",%s", \$1}' packagelist`
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@rvagg
rvagg / install-node.sh
Last active April 2, 2024 16:51
install-node.sh - simple script to fetch and install Node.js releases and nightlies on Linux (x86, x64 & ARM) and OS X
#!/bin/bash
# Note your /usr/local will need to be writable by the user running it,
# alternatively run it with `sudo`
hasxz=$(which xzcat)
os=$(uname | tr '[A-Z]' '[a-z]')
arch=$(uname -m)
targetdir="/usr/local/"
domain=nodejs.org
@sarthakpranesh
sarthakpranesh / cleanMacVMs.sh
Last active March 30, 2024 22:29
Debloat Mac OS ( use at your own risk )
# I use MacOS VMs from github for iOS development.
# By no suprise they are a bit slow and have a lot of things I don't use
# Hence this script for lighter and better VM for my iOS development and builds
# GUI and animation related things to tweak
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
defaults write -g QLPanelAnimationDuration -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock launchanim -bool false
sudo sysctl debug.lowpri_throttle_enabled=0
@b0gdanw
b0gdanw / DisableBigSur.sh
Last active March 29, 2024 09:50
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist
# user
TODISABLE=()
@fatso83
fatso83 / NOTES.md
Created October 9, 2021 07:31
Installing Vagrant on Apple Silicon Macs (M1, M1X, etc)

VirtualBox only supports the x86 platform, so the default installation instructions for Vagrant does not work on Apple silicon. Thankfully Vagrant has a VMWare Provider (more on providers here), and so if I can get VMWare running on my M1 MacBook, I should be able to run Vagrant as well!

These are my notes during figuring this out.

Get the VMWare Tech Preview released in September 2021!

We are in luck, as VMWare released this just a few weeks ago.

  • See [their blog entry][1]
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@lifehome
lifehome / README.md
Last active February 25, 2024 06:34 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

Look out!

A newer version is available!

This gist will no longer update, instead please go to https://github.com/lifehome/systemd-cfddns for more updated versions.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  • If you are using IPv4 for A record, append -v4 to cfupdater in the following systemd service unit.