This file contains hidden or 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
Show hidden characters
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}", | |
"profiles": [ | |
{ | |
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", | |
"hidden": false, | |
"name": "Ubuntu", |
This file contains hidden or 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
""" | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
This file contains hidden or 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
// ==UserScript== | |
// @name GitHub: Double click to edit project note | |
// @version 1 | |
// @grant none | |
// @include https://github.com/*/*/projects/* | |
// ==/UserScript== | |
setTimeout(() => { | |
allCards = document.querySelectorAll(`.project-card`).forEach(el => { | |
if (el.dataset.cardType === '["note"]') { |
This file contains hidden or 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
/** | |
* ROFI Color theme | |
* User: mbfraga | |
* Tweaked by: ewen-lbh | |
* Copyright: Martin B. Fraga | |
*/ | |
/* global settings and color variables */ | |
* { | |
maincolor: #de5251; |
This file contains hidden or 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
# Requires the following: (I'll try to make this less and less specific until it can become a real CLI) | |
# - toml ^0.10.1 | |
# - python-dotenv ^0.13.0 | |
# - pygithub ^1.51 | |
# - python ^3.6 | |
# - semantic-version ^2.8.5 (for the constants.py file) | |
# - a .env file with GITHUB_TOKEN, PYPI_USERNAME and PYPI_PASSWORD set | |
# (GITHUB_TOKEN is a Personal Access Token) | |
# - a {package name}/constants.py declaring a version with: | |
# from semantic_version import Version |
This file contains hidden or 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 random | |
from rich import print | |
from rich.columns import Columns | |
from rich.console import Console | |
from rich.table import Table | |
from schoolsyst_api.database import COLLECTIONS | |
base59 = lambda len: "".join([random.choice(charset) for _ in range(len)]) |
This file contains hidden or 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
[tool.poetry] | |
name = "translator" | |
version = "0.1.0" | |
description = "" | |
authors = ["Ewen Le Bihan <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "^3.8" | |
beautifulsoup4 = "^4.9.3" |
This file contains hidden or 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 re | |
def to_unicode_superscript(n: int) -> str: | |
result = str() | |
for c in str(n): | |
result += { | |
"1": "¹", | |
"2": "²", | |
"3": "³", | |
"4": "⁴", |
This file contains hidden or 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
function startproject --description "Start a project." | |
argparse --name="startproject" \ | |
'd/description=' \ | |
'h/help' \ | |
'p/path=' \ | |
'l/language=' \ | |
'o/owner=' \ | |
'k/kind=!startproject__validate_flag__kind' \ | |
'D/debug' \ | |
-- $argv |
This file contains hidden or 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
# Replace CHAN with desired 4chan.org/CHAN (eg 'c') and OUTFILE with a .html file to output the gallery to | |
# Be sure that you have defined a $BROWSER | |
curl https://a.4cdn.org/CHAN/catalog.json | jq "[.[].threads[] | {title: .sub?, post: (.last_replies[]? | { img: ((.tim? | tostring) + .ext?), comment: .com? })}]" | jq '[.[] | "<h2>\(.title)</h2><img src=https://i.4cdn.org/CHAN/\(.post.img) />"] | join("<hr>")' > OUTFILE && echo "<style>img{max-width:100vw}</style>" >> OUTFILE && $BROWSER OUTFILE |
OlderNewer