This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gpxpy | |
import gpxpy.gpx | |
gpx = gpxpy.gpx.GPX() | |
gpx_track = gpxpy.gpx.GPXTrack() | |
gpx.tracks.append(gpx_track) | |
gpx_segment = gpxpy.gpx.GPXTrackSegment() | |
gpx_track.segments.append(gpx_segment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clip() { | |
local sleep_argv0="password store sleep on display $DISPLAY" | |
pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5 | |
echo -n "$1" | clip.exe || die "Error: Could not copy data to the clipboard" | |
( | |
( exec -a "$sleep_argv0" bash <<<"trap 'kill %1' TERM; sleep '$CLIP_TIME' & wait" ) | |
echo -n | clip.exe | |
) >/dev/null 2>&1 & disown | |
echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds." | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is automatically @generated by Cargo. | |
# It is not intended for manual editing. | |
[[package]] | |
name = "aho-corasick" | |
version = "0.7.15" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" | |
dependencies = [ | |
"memchr", | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init /tmp/fetch_test | |
Initialized empty Git repository in /tmp/fetch_test/.git/ | |
$ pushd /tmp/fetch_test | |
/tmp/fetch_test ~ | |
$ git commit --allow-empty -m initial | |
[master (root-commit) 153b70a] initial | |
$ git checkout -b feature/hello | |
Switched to a new branch 'feature/hello' | |
$ git commit --allow-empty -m hello | |
[feature/hello b8b8f46] hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init /tmp/fetch_test | |
Initialized empty Git repository in /tmp/fetch_test/.git/ | |
$ pushd /tmp/fetch_test | |
/tmp/fetch_test ~ | |
$ git commit --allow-empty -m initial | |
[master (root-commit) 128b0b3] initial | |
$ git checkout -b feature/hello | |
Switched to a new branch 'feature/hello' | |
$ git commit --allow-empty -m hello | |
[feature/hello 94f1307] hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/WICG/webhid/blob/master/EXPLAINER.md | |
// Enable chrome://flags/#enable-experimental-web-platform-features | |
// Bus 020 Device 000: ID 0c45:1010 Sonix Technology Co., Ltd. YUREX | |
let deviceFilter = { vendorId: 0x0c45, productId: 0x1010 }; | |
let requestParams = { filters: [deviceFilter] }; | |
let initReport = new Uint8Array(8).fill(0xff); | |
initReport[0] = 0x52; | |
initReport[1] = 0x0d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for Manatee.Json ver10 | |
open System | |
open System.IO | |
open System.Linq | |
open Manatee.Json | |
open Manatee.Json.Schema | |
open Manatee.Json.Serialization | |
type Item() = | |
member val Name = "" with get, set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
// webusb.ts | |
var StandardCode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
use v5.28; | |
use File::Basename; | |
if (!@ARGV || $ARGV[0] !~ /\.sbpl$/) { | |
print qq($^X $0 graphic.sbpl && convert graphic.pbm graphic.png\n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Drawing | |
$code = @' | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
public static class FontUtil { | |
[DllImport("gdi32.dll")] |
NewerOlder