Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 14:32
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@sergiecode
sergiecode / instalaciones-git-github.md
Last active May 3, 2024 14:30
Instalaciones para curso GIT & GITHUB DESDE CERO
@srcrip
srcrip / example.html.heex
Last active May 3, 2024 14:30
Some helper functions for making nested forms in LiveView
<.form for={@form} class="max-w-xs">
<NestedFormComponents.inputs_for_embeds
:let={embed_form}
parent_form={@form}
field={@form[:items]}
id={"#{@form[:items].id}_embeds"}
sort_param={:items_sort}
drop_param={:items_drop}
>
<div class="grow">
@Pingu501
Pingu501 / gitlab-artifacts-cleanup.py
Created December 9, 2021 11:22
GitLab Artifacts Clean-Up
"""
This is a small python script to clear up old gitlab build artifacts.
There are 3 variables you should modify:
* base_url: path to your gitlab
* access_token: your personal access token to make gitlab api calls
* delete_everything_older_than: configure the timedelta as you wish
!!IMPORTANT!!
By default this script does only make dry-runs and does not actually delete any files!
@dshoreman
dshoreman / slurp.md
Last active May 3, 2024 14:28
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"
@cesarmiquel
cesarmiquel / drupal-8-cheatsheet.md
Last active May 3, 2024 14:26
Drupal 8/9/10 Cheatsheet

Drupal 8 Cheatsheet

Files, Images and Media

// Load file object
$file = File::load($fid);

// Get uri (public://foo/bar/baz.png)
$uri = $file-&gt;getFileUri();
@SoNothingMC
SoNothingMC / CiderAudio.md
Last active May 3, 2024 14:26
The Complete Guide to Cider Audio Lab

The Complete Guide to Cider Audio Lab

(aka Audio Lab descriptions without the jargon)

Have you wondered just what the f**k do those Cider Audio Lab descriptions mean?
Well, let me break it down for you.


What even is Audio Lab?

Cider Audio Lab is a suite of audio enhancement options that make your music sound better.

@pantor
pantor / nvidia-driver-realtime.sh
Last active May 3, 2024 14:25
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
@mbinna
mbinna / effective_modern_cmake.md
Last active May 3, 2024 14:24
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: