Skip to content

Instantly share code, notes, and snippets.

@taskylizard
taskylizard / fmhy.md
Last active May 9, 2024 21:06
/r/freemediaheckyeah, in one single file (view raw)
@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
@felippe-regazio
felippe-regazio / tt-seek-and-destroy.js
Last active May 9, 2024 21:03
Automatically unfollow Twitter users by a given criteria
/**
* ABOUT
*
* This is a Twitter NO-API/Dependency-Free follower sniffer and auto-blocker.
*
* This function performs automatic bulk blocking with NO-API
* and NO-external-dependencies to run. You must run this snippet
* directly on your Console, it will sniff your followers list
* search for previous given keywords, if found on username or description,
* the user will be automatically blocked.
@zachrank
zachrank / wsl2-zsh-powerlevel10k.md
Created August 8, 2022 01:43
WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

wsl2-zsh-powerlevel10k

This gist takes heavy inspiration from kevin-smets / iterm2-solarized.md gist for iTerm2.

Windows Subsystem for Linux 2 (WSL 2)

The first thing that you will want to do is install WSL 2 and a Linux distro.

@Gabriel-Chen
Gabriel-Chen / csv-remove-accent.py
Created June 24, 2018 06:06
Remove All Accent on Letters in a CSV File
# This gist is initially used for analysing data in Spanish
import unidecode
import csv
def remove_accent (feed):
csv_f = open(feed, encoding='latin-1', mode='r')
csv_str = csv_f.read()
csv_str_removed_accent = unidecode.unidecode(csv_str)
csv_f.close()
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 21:01
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
@lawndoc
lawndoc / cloc-gh
Last active May 9, 2024 20:53
Count the total lines of code for a user or organization in GitHub (excludes forks)
#!/usr/bin/env bash
# Author: C.J. May @lawndoc
# Usage: cloc-gh <username>
# Prereqs: cloc gh
cloc_repo () {
gh repo clone "$1" temp-linecount-repo -- --depth 1 > /dev/null 2>&1 &&
cloc temp-linecount-repo | grep SUM | awk '{ print $5 }' >> line_count.txt &&
rm -rf temp-linecount-repo
@Nyr
Nyr / imgur-direct-images.user.js
Last active May 9, 2024 20:48
Redirect imgur to the raw images skipping the crappy HTML pages
// ==UserScript==
// @name imgur direct images
// @description Redirect to the raw images skipping the crappy HTML pages.
// @include /^https?:\/\/imgur\.com\/[A-Za-z0-9]+$/
// @exclude *imgur.com/vidgif
// @exclude *imgur.com/jobs
// @exclude *imgur.com/about
// @exclude *imgur.com/apps
// @exclude *imgur.com/tos
// @exclude *imgur.com/privacy