Skip to content

Instantly share code, notes, and snippets.

View toshsan's full-sized avatar
🌴
On vacation

Santosh Sahoo toshsan

🌴
On vacation
  • CircleHD
  • San francisco
  • X @huhyroceq
View GitHub Profile
@toshsan
toshsan / usa-states.json
Created November 2, 2024 14:07
USA States JSON Array
[
{"label": "Alabama", "value": "alabama", "code": "AL", "about": "Known for its rich history and southern hospitality."},
{"label": "Alaska", "value": "alaska", "code": "AK", "about": "Famous for its stunning natural landscapes and wildlife."},
{"label": "Arizona", "value": "arizona", "code": "AZ", "about": "Home to the Grand Canyon and vibrant desert landscapes."},
{"label": "Arkansas", "value": "arkansas", "code": "AR", "about": "Features diverse geography, including mountains and rivers."},
{"label": "California", "value": "california", "code": "CA", "about": "Known for its entertainment industry and diverse culture."},
{"label": "Colorado", "value": "colorado", "code": "CO", "about": "Famous for its stunning Rocky Mountains and outdoor activities."},
{"label": "Connecticut", "value": "connecticut", "code": "CT", "about": "Rich in colonial history and coastal beauty."},
{"label": "Delaware", "value": "delaware", "code": "DE", "about": "Known as the First State with a vibran
@toshsan
toshsan / Podcast-Checklist.md
Created August 19, 2021 15:32 — forked from pgburt/Podcast-Checklist.md
Audacity Podcast Checklist

Recording

  • Set Audacity to use the External mic.
  • Ensure you're recording in 16-bit PCM + 44100Hz.
  • Do a sound check, record everyone in the room speaking. You want the lighter part of the meter bar (the green or red bar at the top) to bounce between -12db and -6db while people are talking. It's hard to achieve this... so just settle for as close as you can get, without the bars going off the scale :)
  • Play it back and tweak levels until it sounds good @ 60% speaker volume.
  • Save the Project BEFORE recording live :D (prevents quality issues)

Edit for Content

  • Join recordings to one track.
  • Listen to it + Edit bad content out.
@toshsan
toshsan / data.sh
Created May 10, 2021 16:55
Install Python Data Science Libraries
sudo pip3 install numpy sklearn pandas matplotlib keras tensorflow seaborn
@toshsan
toshsan / generate-products.sql
Created November 23, 2020 13:40 — forked from marcocitus/generate-products.sql
Generate mock product data in PostgreSQL
CREATE TABLE IF NOT EXISTS words (
word text
);
CREATE TABLE IF NOT EXISTS product (
product_id int not null,
name text not null,
description text not null,
price decimal(12,2),
attributes jsonb,
@toshsan
toshsan / mime-types.json
Created March 19, 2019 13:36
Known mime/content types mapped by file extension
{
"123": "application/vnd.lotus-1-2-3",
"3dml": "text/vnd.in3d.3dml",
"3ds": "image/x-3ds",
"3g2": "video/3gpp2",
"3gp": "video/3gpp",
"7z": "application/x-7z-compressed",
"aab": "application/x-authorware-bin",
"aac": "audio/x-aac",
"aam": "application/x-authorware-map",
@toshsan
toshsan / hype.jsx
Last active September 16, 2018 18:07
An experimental virtual dom/jsx renderer.
/** @jsx hype */
function render(root, el) {
while (root.lastChild) {
root.removeChild(root.lastChild);
}
root.appendChild(el);
}
function hype(name, attributes, ...children) {
@toshsan
toshsan / user.js
Created August 17, 2018 13:37 — forked from EtienneR/user.js
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@toshsan
toshsan / postgres_queries_and_commands.sql
Created May 29, 2017 17:46 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>collab editing, yo</title>
<link rel="stylesheet" href="http://codemirror.net/lib/codemirror.css">
<link rel="stylesheet" href="http://codemirror.net/theme/ambiance.css">
<script src="http://codemirror.net/lib/codemirror.js"></script>
<script src="http://codemirror.net/addon/mode/overlay.js"></script>
<script src="http://codemirror.net/mode/xml/xml.js"></script>
@toshsan
toshsan / ImageMagick-snippets.md
Created October 26, 2016 19:58 — forked from MohamedAlaa/ImageMagick-snippets.md
ImageMagick Snippets

Remove white background color of an image in ImageMagick

$ convert  your.jpg  -transparent white  your.png

Flatten a transparent image with a white background: