Skip to content

Instantly share code, notes, and snippets.

@hasmanyguitars
hasmanyguitars / rolling_stone_top_500_albums_2020.csv
Last active May 6, 2024 11:41
The 500 Greatest Albums of All Time - Rolling Stone - 2020
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Rank,Artist,Album,Info,Description
500,Arcade Fire,Funeral,"Merge, 2004","Loss, love, forced coming-of-age, and fragile generational hope: Arcade Fire’s debut touched on all these themes as it defined the independent rock of the ‘00s. Built on family ties (leader Win Butler, his wife, Régine Chassagne, his brother Will), the Montreal band made symphonic rock that truly rocked, simultaneously outsize and deeply personal, like the best pop. But for all its sad realism, Butler’s is music that still finds solace, and purpose, in communal celebration.
"
499,"Rufus, Chaka Khan",Ask Rufus,"ABC, 1977","Fronted by Chaka Khan, one of soul music’s most combustible singers, Rufus built its mid-Seventies sound on heavy-footed, guitar-slathered funk. But after spending 16 months in the studio working on Ask Rufus, they came out with a record that gave their songs more room to breathe, anticipating the lithe, loose arrangements of Nineties neo-soul. Khan glided through the head-nodding “Everlasting Love” and the twisty-tur
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 6, 2024 11:39
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), 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(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
Encoded Traversal Strings:
../
..\
..\/
%2e%2e%2f
%252e%252e%252f
%c0%ae%c0%ae%c0%af
%uff0e%uff0e%u2215
%uff0e%uff0e%u2216
@alejzeis
alejzeis / timezone-mappings.csv
Created March 15, 2017 00:12
Linux-Windows Timezone Mappings CSV
AUS Central Standard Time 001 Australia/Darwin
AUS Central Standard Time AU Australia/Darwin
AUS Eastern Standard Time 001 Australia/Sydney
AUS Eastern Standard Time AU Australia/Sydney Australia/Melbourne
Afghanistan Standard Time 001 Asia/Kabul
Afghanistan Standard Time AF Asia/Kabul
Alaskan Standard Time 001 America/Anchorage
Alaskan Standard Time US America/Anchorage America/Juneau America/Metlakatla America/Nome America/Sitka America/Yakutat
Aleutian Standard Time 001 America/Adak
Aleutian Standard Time US America/Adak
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 11:40
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@agramfort
agramfort / ranking.py
Created March 18, 2012 13:10 — forked from fabianp/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer.
Authors: Fabian Pedregosa <fabian@fseoane.net>
Alexandre Gramfort <alexandre.gramfort@inria.fr>
"""
@bennycode
bennycode / window-fetch-post.js
Created February 18, 2019 23:19
Send POST request in Google Chrome
// Using "var" here to easily change the parameters and resubmit the code in a JS dev console!
var url = 'http://127.0.0.1:3000/login';
var parameters = {
user: 'bennyn',
password: 'secret'
};
fetch(url, {
method: 'post',