Skip to content

Instantly share code, notes, and snippets.

View jjmpsp's full-sized avatar
💭
Working on a new personal website

Joel Murphy jjmpsp

💭
Working on a new personal website
View GitHub Profile
@BrendonKoz
BrendonKoz / leaflet-darkmode.md
Last active March 19, 2024 08:29
Automatic Dark Mode for Leaflet.js
// Leaflet JS - note the *className* attribute
// [...]

L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
    className: 'map-tiles'
}).addTo(map);

// [...]
@pamelafox
pamelafox / astronauts.sql
Created March 20, 2020 18:24
NASA astronauts, 1959-Present
/* Source:
https://www.kaggle.com/nasa/astronaut-yearbook
*/
CREATE TABLE astronauts(
Name TEXT PRIMARY KEY,
Year INTEGER,
GroupNum INTEGER,
Status TEXT,
Birth_Date TEXT,
Birth_Place TEXT,
@pamelafox
pamelafox / nba_players.sql
Created March 20, 2020 18:17
NBA players of the week
/*
Source:
https://www.kaggle.com/jacobbaruch/nba-player-of-the-week
*/
CREATE TABLE players(
Player TEXT,
Team TEXT,
Conference TEXT,
Date TEXT,
Position TEXT,
@pamelafox
pamelafox / pokemon.sql
Created March 20, 2020 16:51
Pokemon statistics
CREATE TABLE pokemon(
Number INTEGER,
Name TEXT PRIMARY KEY,
Type_1 TEXT,
Type_2 TEXT,
Total INTEGER,
HP INTEGER,
Attack INTEGER,
Defense INTEGER,
Sp_Atk INTEGER,
@pamelafox
pamelafox / superbowls.sql
Created March 20, 2020 16:40
Superbowls 1967-2020 (Winners and losers of all Superbowl finals)
CREATE TABLE superbowls(
Date TEXT PRIMARY KEY,
SB TEXT,
Winner TEXT,
Winner_Pts INTEGER,
Loser TEXT,
Loser_Pts INTEGER,
MVP TEXT,
Stadium TEXT,
City TEXT,

How to set up a new Production Server running Node on Ubuntu

START

Always start with an Update:

$ sudo apt-get update

Create folder for project:

$ mkdir production
@Phlow
Phlow / jeykll-post-counter.liquid
Last active November 22, 2019 00:27
Counter: This code snippet just counts your jekyll posts and spits out the result
{% comment %}
*
* Counter: This include counts your jekyll posts
*
{% endcomment %}{% assign counter = 0 %}{% for item in site.posts %}{% unless item.published == false %}{% assign counter=counter | plus:1 %}{% endunless %}{% endfor %}{{ counter }}
@pamelafox
pamelafox / card_games_results.sql
Created May 8, 2015 19:19
card_games_results.sql
/* Friendly Card Game Results:
During this past winter, a few friends got together every Wednesday night for a friendly game of cards. On some nights they'd play two games, but never the same game twice on the same night. The usual players were Spunky Sam, Marcimus, Winston, and Hopper. Sometimes, one of the friends couldn't make it, so there were only three players. But sometimes they'd call another friend to fill-in. In every game they played, the one with the hightest score was declared the winner. These are their results:
Created by: https://www.khanacademy.org/profile/brianduckworth
*/
CREATE TABLE card_games(id INTEGER PRIMARY KEY AUTOINCREMENT,
date_played TEXT,
game_name TEXT,
player_name TEXT,
score INTEGER);
@pamelafox
pamelafox / earned_badges.sql
Created May 8, 2015 18:37
earned_badges.sql
/*
Earned Badges
This table contains badges earned by a user, including the most recent date achieved, the type, the name, the # of energy points earned, and the activity earned from.
Collected by: https://www.khanacademy.org/profile/chopsor/
*/
CREATE TABLE badges (
date TEXT,
badge_type TEXT,
badge_name TEXT,
@pamelafox
pamelafox / furniture_store_sales.sql
Created May 8, 2015 18:31
furniture_store_sales.sql
/*
Sales from an online furniture store
Collected by: https://www.khanacademy.org/profile/charlesb2000/
*/
CREATE TABLE sales(
ID INTEGER NOT NULL PRIMARY KEY
, transaction_date TEXT
, product TEXT
, price INTEGER
, payment_type TEXT