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 requests | |
| class PlacesAutocomplete: | |
| """https://developers.google.com/maps/documentation/places/web-service/autocomplete?hl=id | |
| Args: | |
| components (str) : expects country code e.g. country:ca | |
| place_types (str) : e.g. (cities) | |
| key (str) : Google Places autocomplete API key |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # tuic - textual user interface controller | |
| # Experiments With Curses | 2021, July 17 | |
| # I'm currently working on writing a simple TUI for a web crawler | |
| # that supports scraping and analyzing anything you want to write a plugin for. | |
| # This file creates two windows and draws boxes around the created windows | |
| # The windows respond to the terminal resizing and the terminal display will be redrawn to reflect the new size | |
| # KNOWN ISSUES: When terminal size becomes too small the program crashes |
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
| from dataclasses import dataclass | |
| @dataclass | |
| class HexCode(str): | |
| hex: str | |
| def rgb(self): | |
| hex_string = self.hex.lstrip('#') | |
| lv = len(hex_string) | |
| return tuple(int(hex_string[i:i + lv // 3], 16) for i in range(0, lv, lv // 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from typing import List | |
| import requests | |
| import json | |
| def get_startme_links(page_ids: List[str] = None): | |
| if page_ids is None: | |
| raise ValueError(f"expected list of start.me ids, received: {page_ids}") |
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
| #!/bin/bash | |
| PROJECT_NAME=todo | |
| SEMVER_FILE=./version.sh | |
| version=0.0.0 | |
| if [ -f "$SEMVER_FILE" ]; then | |
| source $SEMVER_FILE | |
| version=$SEMVER | |
| fi |
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
| [ | |
| { | |
| "label": "GEOSINTsearch", | |
| "description": "Searches within posts from Twitter, Reddit and 4Chan and presents anything that contains a Google Maps link", | |
| "value": "https://cse.google.com/cse?cx=015328649639895072395:sbv3zyxzmji" | |
| }, | |
| { | |
| "label": "Pasted tekst", | |
| "description": "Look if any specifc text has been posted before", | |
| "value": "https://cse.google.com/cse/publicurl?cx=013991603413798772546:nxs552dhq8k" |
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
| #!/bin/bash | |
| ffmpeg \ | |
| -i "$1" \ | |
| -r "$2" \ | |
| -vf "scale=512:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \ | |
| "$1.gif" |
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
| # | |
| # ~/.bashrc | |
| # | |
| # If not running interactively, don't do anything | |
| [[ $- != *i* ]] && return | |
| alias ls='ls --color=auto' | |
| alias grep='grep --color=auto' |
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
| #!/bin/env bash | |
| # https://stackoverflow.com/a/61487052 | |
| # Create some nice table-like logs for a beautiful output | |
| while IFS=+ read -r graph hash time branch message;do | |
| # Count needed amount of white spaces and create them | |
| whitespaces=$((9-$(sed -nl1000 'l' <<< "$graph" | grep -Eo '\\\\|\||\/|\ |\*|_' 2>/dev/null | wc -l))) | |
| whitespaces=$(seq -s' ' $whitespaces|tr -d '[:digit:]') | |
| # Show hashes besides the tree ... |
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
| Host codeberg.org | |
| HostName codeberg.org | |
| IdentitiesOnly yes | |
| HostName codeberg.org | |
| IdentityFile ~/.ssh/id_codeberg | |
| Host github.com | |
| IdentitiesOnly yes | |
| HostName github.com | |
| IdentityFile ~/.ssh/id_github |
OlderNewer