Skip to content

Instantly share code, notes, and snippets.

View ohld's full-sized avatar

Daniil Okhlopkov ohld

View GitHub Profile
@ohld
ohld / twitter_usernames_gr_1m_followers.csv
Created June 12, 2023 15:51
Twitter Usernames with more than 1 million subscribers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"username"
"aussiegrit"
"mfbeltrones"
"buffalobills"
"aeexpo"
"puma"
"indiatoday"
"ystk_yrk"
"franco_esca"
"houstontexans"
@codingjoe
codingjoe / geodjango_macOS_arm64.md
Created March 11, 2021 10:29
HowTo run GeoDjango and PostGIS on M1 macOS arm64 MacBook
  1. Install PostgreSQL with PostGIS via Postges.app
  2. Install brew as recommended.
  3. Install dependencies:
    brew install geos gdal
    
  4. Add the following to your settings:
    # settings.py
    

GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')

@marcantoine
marcantoine / showMetabaseQuestiontAsiOSWidget.js
Last active June 13, 2022 08:15
showMetabaseQuestiontAsiOSWidget.js
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e
// and @levelsio's https://gist.github.com/levelsio/a1ca0dd434b77ef26f6a7c403beff4d0
// HOW TO
// 1) Make a new Metabase Question
// 2) Make the result an unique number and choose Visualization > Number
// 3) Write your metabase domain, your email and password below
const domain = "https://metabase.endpoint.com"
const username = "my.e@mail.com"
const password = "p@ssw0rd"
@ohld
ohld / update_metabase.sh
Created August 20, 2020 13:34
How to update Metabase if it is deployed via Dokku (Docker) and you migrated from default H2 (in my case to Postgres)
# Make sure you migrated from default H2 db to production-ready (like Postgres)
# because otherwise you'll loose data (dashboards, graphs, users)
docker pull metabase/metabase:latest
docker tag metabase/metabase:latest dokku/lu-metabase:latest
dokku tags:deploy lu-metabase
@ahopkins
ahopkins / # Sanic websocket feeds v2.md
Last active February 5, 2022 14:46
Sanic based websocket pubsub feed

Sanic Websockets Feeds v2

This is an outdated version

See latest

@alfg
alfg / .travis.yml
Created January 19, 2019 05:44
Travis Git deployments to Dokku
language: bash
before_install:
- echo $super_secret_password | gpg --passphrase-fd 0 .travis/deploy.key.gpg
- eval "$(ssh-agent -s)"
- chmod 600 .travis/deploy.key
- ssh-add .travis/deploy.key
- ssh-keyscan git.host.com >> ~/.ssh/known_hosts
after_success:
- git remote add deploy dokku@git.host.com:app
- git config --global push.default simple
@caffeinum
caffeinum / simple-send.js
Last active September 25, 2020 12:25
Pure-JS OmniLayer sendtx
const bitcoin = require('bitcoinjs-lib') // version @3.3.2, ver4 won't work
const request = require('request-promise-native')
const net = process.env.NETWORK === 'testnet'
? bitcoin.networks.testnet
: bitcoin.networks.bitcoin
const API = net === bitcoin.networks.testnet
? `https://test-insight.swap.online/insight-api`
: `https://insight.bitpay.com/api`
@AO8
AO8 / crawler.py
Last active May 23, 2023 09:12
Crawl a website and gather all internal links with Python and BeautifulSoup.
# Adapted from example in Ch.3 of "Web Scraping With Python, Second Edition" by Ryan Mitchell
import re
import requests
from bs4 import BeautifulSoup
pages = set()
def get_links(page_url):
global pages
@ahopkins
ahopkins / sanic_feed.py
Last active September 28, 2019 21:08
Websocket feed using Sanic
from sanic import Sanic
import json
import asyncio
app = Sanic(__name__)
feeds = {}
class Feed(object):
@BusterNeece
BusterNeece / broadcast.sh
Created May 13, 2017 03:29
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"