Skip to content

Instantly share code, notes, and snippets.

@StudioLE
StudioLE / 00-change-motd.sh
Last active June 4, 2020 09:58
Ubuntu Change Message of the Day (MOTD)
#!/bin/bash
# https://raymii.org/s/tutorials/Disable_dynamic_motd_and_motd_news_spam_on_Ubuntu_18.04.html
# Disable Dynamic MOTD
# Change ENABLED=1 to ENABLED=0.
sudo nano /etc/default/motd-news
# Disable a few components
sudo chmod -x /etc/update-motd.d/00-header
@jamesperrin
jamesperrin / github-labels-export.js
Last active July 17, 2023 21:03
JavaScript file for exporting GitHub labels to a JSON object.
/*
Purpose: Export the configuration settings for GitHub Labels.
(c) James Perrin, MIT License, https://www.countrydawgg.com, | @jamesperrin
Exporting Instructions:
1. Open a web browser.
2. Navigate to the desired GitHub repository.
3. Navigate to Issues tab.
@ghostbear
ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active May 12, 2024 23:04
[Spotify] How to limit the cache size (Windows/Mac OS)

Credit to MadHatter

WINDOWS

Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
@ytjohn
ytjohn / notes.md
Created November 16, 2016 20:31
quick notes on doing a kvm image from ubuntu cloud image
@kentbrew
kentbrew / pinmarklet.md
Last active April 9, 2024 18:34
How to recreate your long-lost Pinterest bookmarklet.

How to recreate your long-lost Pinterest bookmarklet.

Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).

In Name, put this:

Pin It

In URL, put this:

@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active May 10, 2024 14:57
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@Informatic
Informatic / README.md
Last active April 9, 2024 07:09
cloud-init "nocloud" networking setup

cloud-init is absolute cancer. Its code is horrible. It has no documentation at all.

It took me 5 fucking hours to figure out how to properly configure networking on recent cloud-init (Ubuntu 16.04 cloud image) with local datasource.

It's not mentioned anywhere you need to provide dsmode: local. (but only if you need network-config, besides that everything is fine; someone below noted that -m flag does the same thing, good to know) Of course nobody needs documentation for network-config format either. (cloudinit/net/__init__.py is a protip, enjoy the feces dive)

Oh, and by the way - no, it's not possible to provide network-config to uvt-kvm without patching shit.

@dwmkerr
dwmkerr / setup-sublime3-for-angular2.md
Last active April 11, 2020 03:30
Quickly setup Sublime Text 3 for Angular 2

Quick Setup for Sublime Text 3 for Angular 2

Easy to remember, easy to forget.

Step 1: Download Sublime Text 3

Sublime Text 3 Download

Step 2: Create a bash shortcut

It's nice to be able to run subl in a terminal.

@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@davidfowl
davidfowl / dotnetlayout.md
Last active May 15, 2024 07:06
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/