Skip to content

Instantly share code, notes, and snippets.

@smartexpert
smartexpert / cf_domain_pricing.json
Created October 27, 2024 17:00
Cloudflare Domain Pricing
[
{
"Extension": ".academy",
"Current fee (per year)": "$25.18",
"New fee (per year)": "$33.18",
"Effective from": "October 15, 2024"
},
{
"Extension": ".accountants",
"Current fee (per year)": "$75.18",
@smartexpert
smartexpert / docx_to_conll.py
Last active June 1, 2024 19:09 — forked from harshildarji/docx_to_conll.py
Python script to extract comments from .docx file, and convert into CoNLL format.
import json
import os
import string
import zipfile
from lxml import etree
from nltk.tokenize import RegexpTokenizer
from tqdm import tqdm
import docx
@smartexpert
smartexpert / script.js
Created February 15, 2024 17:13 — forked from gd3kr/script.js
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@smartexpert
smartexpert / index.html
Created March 4, 2023 00:56
Redirect counter with message
<center>
<br/>
<h1>Announcement</h1>
<p>You will be redirected in <span id="seconds-holder"></span> seconds.<br/><br/> If your browser does not redirect you automatically click <a href="" id="link">here</a>.
</p>
</center>
@smartexpert
smartexpert / .gitignore
Last active December 18, 2022 12:58
generic gitignore file for my projects
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
@smartexpert
smartexpert / tw_fxrates.json
Created November 1, 2022 17:54
Exchange Rates JSON
This file has been truncated, but you can view the full file.
[
{
"rate": 0.133411,
"source": "INR",
"target": "SEK",
"time": "2022-11-01T17:51:04+0000"
},
{
"rate": 7.49562,
"source": "SEK",
@smartexpert
smartexpert / poetry_debug.toml
Created October 13, 2022 19:05
Debug for poetry git SSL issue
[tool.poetry]
name = "whisper-play"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
readme = "README.md"
packages = [{include = "whisper_play"}]
[tool.poetry.dependencies]
python = "^3.8"
@smartexpert
smartexpert / fix_ssh_pk_perms.cmd
Created January 20, 2021 19:03
Fix SSH private key permissions on Windows by restricting access to only the current user
icacls .\private.key /inheritance:r
icacls .\private.key /grant:r "%username%":"(R)"
@smartexpert
smartexpert / install_docker.sh
Last active February 18, 2022 13:58
docker setup in digital ocean
## All lines have to be run separately
## Install docker
sudo apt update -y && sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" -y && sudo apt update -y && apt-cache policy docker-ce && sudo apt install docker-ce -y
sudo systemctl status docker
## Setup docker compose
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: blog
namespace: default
spec:
entryPoints:
- secure
routes: