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 time | |
from telethon import TelegramClient, events | |
# sample API_ID from https://github.com/telegramdesktop/tdesktop/blob/f98fdeab3fb2ba6f55daf8481595f879729d1b84/Telegram/SourceFiles/config.h#L220 | |
# or use your own | |
api_id = 17349 | |
api_hash = '344583e45741c457fe1862106095a5eb' | |
# fill in your own details here |
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 telethon import TelegramClient | |
from telethon.errors.rpc_errors_401 import SessionPasswordNeededError | |
# (1) Use your own values here | |
api_id = 17349 | |
api_hash = '344583e45741c457fe1862106095a5eb' | |
phone = 'YOUR_NUMBER_HERE' | |
username = 'username' |
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
asn() { | |
if [ -z "$1" ] | |
then | |
echo "usage: asn url" 1>&2 | |
return 1 | |
fi | |
ips=$(dig $DIG_ARGS +short $1) | |
if [ -z "$ips" ] | |
then |
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
#!/usr/bin/env bash | |
set -e | |
config_dir=${HOTCORNERS_CONFIG_DIR:-$HOME/.hotcorners} | |
if [ -z "$1" ]; then | |
echo "usage: hotcorners profile" 1>&2 | |
exit 1 | |
fi |
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 signal | |
import sys | |
from google.cloud import language | |
from google.api_core.exceptions import InvalidArgument | |
# create a Google Cloud Natural Languague API Python client | |
client = language.LanguageServiceClient() | |
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
{ | |
"name": "Actions dashboard", | |
"builds": [ | |
{ | |
"owner": "actions", | |
"repo": "starter-workflows", | |
"ref": "main", | |
"include_prs": true | |
}, | |
{ |
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
"Linear Escape" by Jiayu Yi | |
Dead End is a dark room. "[if unvisited]You wake up in[otherwise]The room you woke up in is[end if] a small room with a single exit to the south." | |
A lit thing called a torch is in the Dead End. | |
The strangely-shaped rock is carried by the player. | |
South of the Dead End is the Overgrown Chamber. The Overgrown Chamber is a dark room. "You find yourself in a large chamber. The walls are covered with vegetation, and [sturdy vines] hang from the ceiling. The middle is occupied by a large, [ceremonial brazier]. [if the ceremonial brazier is lit]There are exits to the north and south.[otherwise]There is an exit to the north, but a stone door blocks the way south." |
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
defmodule SSEDemoPlug do | |
use Plug.Router | |
plug Plug.Logger | |
plug(:match) | |
plug(:dispatch) | |
get "/" do | |
html = """ | |
<ul></ul> |
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
:- use_module(library(clpfd)). | |
zebra(Colors, Nationalities, Pets, Beverages, Cigarettes) :- | |
Colors = [Red, Green, Ivory, Yellow, Blue], | |
Nationalities = [English, Spanish, Ukrainian, Norweigian, Japanese], | |
Pets = [Dog, Snails, Fox, Horse, Zebra], | |
Beverages = [Coffee, Tea, Milk, Orange, Water], | |
Cigarettes = [Old, Kools, Chesterfields, Lucky, Parliaments], | |
Colors ins 1..5, | |
Nationalities ins 1..5, |
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
#!/usr/bin/env bash | |
# Check if the working tree is clean. | |
# The working tree is clean if the output of `git status --porcelain` is empty. | |
[ -z "$(git status --porcelain)" ] || echo "Working tree not clean." | |
# Check if there are any stashes. | |
# There are no stashes if the output of `git stash list` is empty. | |
[ -z "$(git stash list)" ] || echo "Stash list not empty." |
NewerOlder