-
Run the command:
python pixiv_auth.py login
This will open the browser with Pixiv login page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###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/"$//' > rawlist | |
grep 'http' rawlist | xargs -i curl -s -w '\n' {} | sed -r 's/^.*"(AAC|MP3)","Url": "//'| sed 's/",".*//' > interm | |
cInterm=1 | |
let "cRaw=1" | |
OUTPUT="${1}.m3u" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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'. |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |