Skip to content

Instantly share code, notes, and snippets.

.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
font-size: 14px;
Verifying my Blockstack ID is secured with the address 1TsQvxpMyQF4pntFpXsddGQzs9MsTsF8z https://explorer.blockstack.org/address/1TsQvxpMyQF4pntFpXsddGQzs9MsTsF8z
let batch = db.batch
let docToWrite = {
stringField: "StringValue",
dateField: {
startDate: new Date('2018–09–07')
}
}
let setOptions = { merge: true }
@smartexpert
smartexpert / snippets.md
Last active January 30, 2021 12:37
Snippets

Create an empty file in Windows

This is to emulat touch file.extention on Mac

copy NUL filename.txt

Change conda auto activate base environment

conda config --set auto_activate_base false

Create new python3 virtual environment

python3 -m venv env

alembic==1.1.0
amqp==2.5.1
apispec==1.3.3
asn1crypto==0.24.0
attrs==19.1.0
Babel==2.7.0
billiard==3.6.1.0
bleach==3.1.0
boto3==1.4.7
botocore==1.7.48
@smartexpert
smartexpert / ExcelSearch.ps1
Created October 1, 2019 15:49
PowerShell Excel String Search
# Credits to Boe Prox for his article on https://mcpmag.com/articles/2018/04/06/find-excel-data-with-powershell.aspx
# from which this code is pulled
Function Search-Excel {
[cmdletbinding()]
Param (
[parameter(Mandatory, ValueFromPipeline)]
[ValidateScript({
Try {
If (Test-Path -Path $_) {$True}
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: blog
namespace: default
spec:
entryPoints:
- secure
routes:
@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
@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 / 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 <you@example.com>"]
readme = "README.md"
packages = [{include = "whisper_play"}]
[tool.poetry.dependencies]
python = "^3.8"