Skip to content

Instantly share code, notes, and snippets.

View cjtapper's full-sized avatar

Chris Tapper cjtapper

View GitHub Profile
@cjtapper
cjtapper / macos-tmux-256color.md
Created June 30, 2023 00:58 — forked from joshuarli/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

macOS has ncurses version 5.7 which doesn't ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color you can use screen-256color, place this command into your ~/.tmux.conf.

set-option -g default-terminal "screen-256color"
@cjtapper
cjtapper / c_single_file_terminus.sublime-build
Last active June 6, 2020 02:35
Sublime Text 3 build system for a single C file. Compiles with gcc and runs in Terminus window.
{
"target": "terminus_exec",
"cancel": "terminus_cancel_build",
"shell_cmd" : "gcc $file_name -o ${file_base_name}",
"working_dir" : "$file_path",
"variants": [
{
"name": "Run",
"shell_cmd": "gcc $file_name -o ${file_base_name} && ${file_path}/${file_base_name}"
}
@cjtapper
cjtapper / solcast_client_example.py
Last active February 6, 2017 22:53 — forked from Layoric/solcast_client_example.py
Example solcast-py API usage.
import solcast
# Print soonest PV power forecast
pv_power_resp = solcast.get_pv_power_forecasts(-35, 149, capacity=2000, tilt=23, azimuth=0, api_key='INSERTYOURAPIKEYHERE')
print(pv_power_resp.forecasts[0].pv_estimate)
import java.util.ArrayList;
import java.util.Date;
public class Astar {
private static int MAP1_WIDTH = 5;
private static int MAP1_HEIGHT = 5;
private static int MAP2_WIDTH = 5;
private static int MAP2_HEIGHT = 5;
private static int START_SQUARE = 3;