Skip to content

Instantly share code, notes, and snippets.

@hucsmn
hucsmn / wsl2.md
Last active July 5, 2024 19:20
A collection of WSL2 hacks

Notes on configuring ArchWSL on WSL2.

Basic setup

Edit %UserProfile%\.wslconfig:

[wsl2]
swap=0
localhostForwarding=true
@lukemerrett
lukemerrett / Basic_Game.lua
Created October 30, 2017 20:07
Basic Pico-8 Game
in_progress = 0
start_end_game = 1
game_over = 2
left=0 right=1 up=2 down=3
valid_moves = {left,right,up,down}
function _init()
player = {}
player.x = flr(rnd(120))
@ItKindaWorks
ItKindaWorks / BreadboardLayout.png
Last active March 24, 2018 20:19
A small Arduino script to control a garage door opener.
BreadboardLayout.png
@wojteklu
wojteklu / clean_code.md
Last active November 17, 2024 20:34
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

@tywhang
tywhang / README.md
Last active June 26, 2024 15:04
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

smashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to smashing

Make awesome charts like these:

@mapledyne
mapledyne / application.scss
Created July 1, 2015 16:18
Will mark stale widgets in Dashing
$background-stale-color-1: #cc9999;
$background-stale-color-2: #333333;
$text-stale-color: #fff;
@-webkit-keyframes status-stale-background {
0% { background-color: $background-stale-color-1; }
50% { background-color: $background-stale-color-2; }
100% { background-color: $background-stale-color-1; }
}
#!/bin/bash
{
date_slug=$(date "+%y%m%d")
image_filename="$PWD/images/$date_slug.jpg"
cache_page_filename="$PWD/cache/ap$date_slug.html"
function download_page() {
if [ ! -f $cache_page_filename ]; then
curl -# -L http://apod.nasa.gov/apod/ap$date_slug.html \
@PriteshJain
PriteshJain / trex.html
Created March 30, 2015 11:21
T-Rex game from Chrome offline mode. Download and open in Chrome browser (Runs only on Chrome)
<html i18n-values="dir:textdirection;lang:language" dir="ltr" lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no">
<title i18n-content="title">T-Rex Game</title>
<style>/* Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. */
a {
@camillebaldock
camillebaldock / README.md
Last active May 19, 2018 07:52
Dashing Trello widget

Description

A Dashing widget for displaying the number of items of lists on a Trello board.

screen shot

See a live demo here.

Usage

@SaMnCo
SaMnCo / Gemfile
Last active May 31, 2018 08:54
Dashing Dynamic Map
## This is for the Dynamic Map Widget
gem 'rest-client'