This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# ripple - A simple Ruby script to create a text ripple effect in the terminal. | |
## From the command line, you can run: | |
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional | |
## Run a command during the animation: | |
# $ ruby ripple "Your Text Here" --speed fast --rainbow --direction bidirectional --command "sleep 5" | |
# This will animate the text "Your Text Here" with the specified options, and run the command in the background. |
needs() { | |
command -v "$1" > /dev/null || { >&2 printf "%s is required- not installed or in PATH; %s\n" "$1" "${@:2}"; return 1; } | |
} | |
_generate_curl_api_request_for_please() { | |
needs jq; | |
local request args timeout model curl; | |
local curl=${CURL:-curl}; | |
local model=${OPENAI_MODEL:-gpt-4o}; | |
local timeout=${OPENAI_TIMEOUT:-30}; |
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard |
; Tested and working using AutoHotkey v1.1.33.09 | |
awaitKeypress(){ | |
ih := InputHook() | |
ih.KeyOpt("{All}", "ES") ; End and Suppress | |
; Exclude the modifiers | |
ih.KeyOpt("{LCtrl}{RCtrl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}", "-ES") | |
ih.Start() | |
ErrorLevel := ih.Wait() ; Store EndReason in ErrorLevel | |
result := ih.EndMods . ih.EndKey |
@"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" -sins -y "srv*nul" -c "r rip = ntdll!NtTerminateProcess; r rcx = -1; r rdx = 0; r rsp = (@rsp & 0xFFFFFFFFFFFFFFF0) - 8; eq @rsp (-1); qd" -p %1 |
using namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
#Import-Module PSColors | |
#Import-Module posh-git | |
Import-Module -Name Terminal-Icons |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |
λ picat miracle.pi | |
CPU time 0.034 seconds. Backtracks: 0 | |
{4,8,3,7,2,6,1,5,9} | |
{7,2,6,1,5,9,4,8,3} | |
{1,5,9,4,8,3,7,2,6} | |
{8,3,7,2,6,1,5,9,4} | |
{2,6,1,5,9,4,8,3,7} | |
{5,9,4,8,3,7,2,6,1} |
#!/usr/bin/env python3 | |
import z3 | |
import pprint | |
# 9x9 matrix of integer variables | |
X = [ [ z3.Int("x_%s_%s" % (i+1, j+1)) for j in range(9) ] | |
for i in range(9) ] | |
# each cell contains a value in {1, ..., 9} | |
cells_c = [ z3.And(1 <= X[i][j], X[i][j] <= 9) |