Discover gists
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Colorable Grid</title> | |
<style> | |
#grid-container { | |
margin: 0 0; | |
padding: 0 0; |
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
# This script requires to have some basic Python skills | |
# - Install python dependencies (thanks to TitwitMuffbiscuit on reddit) : | |
# pip install nltk beautifulsoup4 googlesearch-python trafilatura wolframalpha | |
# | |
# If you get this error "Resource punkt not found", it's because Punkt sentence tokenizer for Natural Language Toolkit is missing. | |
# Edit the file and add this before | |
# from nltk.tokenize import word_tokenize , | |
# it will download the necessary english.pickle: | |
# import nltk | |
# nltk.download('punkt') |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Colorable Grid</title> | |
<style> | |
#grid-container { | |
margin: 0 0; | |
padding: 0 0; |
Example of Kamal deployment from Github Actions.
Add your applications .env
variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions
https://github.com/username/repo_name/settings/secrets/actions
you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret
create action workflows
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
function Write-AnsiHyperlink { | |
<# | |
.SYNOPSIS | |
Creates an ANSI Hyperlink in a supported terminal such as Windows Terminal 1.4 | |
#> | |
[CmdletBinding()] | |
param( | |
#The Uri that you wish to have as part of the hyperlink | |
[Parameter(Mandatory,ValueFromPipeline)][UriBuilder]$Uri, | |
#The label text that will actually be shown in Windows Terminal |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Colorable Grid</title> | |
<style> | |
#grid-container { | |
display: grid; | |
grid-template-columns: repeat(5, 5px); |
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 json, time | |
from threading import Thread | |
from websocket import create_connection, WebSocketConnectionClosedException | |
def main(): | |
ws = None | |
thread = None | |
thread_running = False | |
thread_keepalive = None |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Colorable Grid</title> | |
<style> | |
#grid-container { | |
display: grid; | |
grid-template-columns: repeat(5, 5px); |
NewerOlder