Skip to content

Instantly share code, notes, and snippets.

View Qwerty-Space's full-sized avatar
💭
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

Qwerty-Space Qwerty-Space

💭
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
View GitHub Profile
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@seraphyn
seraphyn / cfg_notion.lua
Created November 29, 2013 11:23
Notion Konifguration
-- Ion main configuration file
--
-- This file only includes some settings that are rather frequently altered.
-- The rest of the settings are in cfg_ioncore.lua and individual modules'
-- configuration files (cfg_modulename.lua).
--
-- Set default modifiers. Alt should usually be mapped to Mod1 on
-- XFree86-based systems. The flying window keys are probably Mod3
-- or Mod4; see the output of 'xmodmap'.
@AWMooreCO
AWMooreCO / AdvancedWindowSnap.ahk
Last active July 9, 2024 03:29
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <[email protected]>
* @version 1.0
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
###genm3uplaylist.sh
# Execute ./genm3uplaylist.sh SOURCE
# the output will be SOURCE.m3u
grep 'http' "$1" | sed 's/\t//' | tr -d '\r' | xargs -i curl -s -w '\n' {} | grep StreamUrl | sed 's/^[^[]*description/description/' | sed -r 's/(,"Logo").*//' | sed 's/,"broadcast".*,"StreamUrl":/,"StreamUrl":/' | sed -r 's/,"Premium.*//' | grep http | sed 's/","/\n/' | sed 's/description":"/#EXTINF:-1\ group-title="radio"\ radio="true",/' | sed 's/StreamUrl":"//' | sed 's/"$//' &gt; rawlist
grep 'http' rawlist | xargs -i curl -s -w '\n' {} | sed -r 's/^.*"(AAC|MP3)","Url": "//'| sed 's/",".*//' &gt; interm
cInterm=1
let "cRaw=1"
OUTPUT="${1}.m3u"
@joyrexus
joyrexus / README.md
Last active August 6, 2024 16:07
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@udf
udf / ass.py
Created April 13, 2018 13:47
Generates fancy colours by abusing the order(lessness) of a set; it's called ass because i didn't expect it to work so well (or at all)
from PIL import Image
import random
def thing(val):
val += (-4, -3, -2, -1, 1, 2, 3, 4)[random.getrandbits(3)]
if val < 0: return 0
if val > 255: return 255
return val
@udf
udf / sticker_downloader.py
Last active August 13, 2022 17:27
Telegram Sticker Pack Downloader Script
import asyncio
import logging
import os
from collections import defaultdict
from telethon.errors import MessageNotModifiedError
from telethon import TelegramClient
from telethon import events
from telethon.tl.types import DocumentAttributeSticker, DocumentAttributeFilename
from telethon.tl.functions.messages import GetStickerSetRequest
@ZipFile
ZipFile / README.md
Last active November 12, 2024 11:47
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.