https://x.com/Iilstinky/status/1772055633346359758
😦
😐
https://x.com/johnboiles/status/1772282276434317820
screams in c++
| // A simple game engine | |
| // #1: The state of the game | |
| // Aliens starting positions | |
| const aliens = [{x: 10, y: 10}, {x:20, y:5}, {x: 25, y:15}] | |
| // Ship info | |
| const ship = { x: 5, direction: 0 } |
| set -eu | |
| # /mingw64/include conflicts with /usr/include | |
| if [[ ! -e llvm-include ]]; then | |
| mkdir -p llvm-include | |
| pacboy files mingw-w64-x86_64-llvm mingw-w64-x86_64-clang | | |
| perl -ne 'print "$1\n" if /\/mingw64\/include\/(.*)/' | | |
| while read -r h; do | |
| mkdir -p llvm-include/"$(dirname "$h")" | |
| ln -s /mingw64/include/"$h" llvm-include/"$h" |
| // Run from https://jenkins/script | |
| import hudson.util.RemotingDiagnostics; | |
| cmd = 'def proc = ["conan", "--version"].execute(); proc.waitFor(); println proc.in.text'; | |
| for (slave in hudson.model.Hudson.instance.slaves) { | |
| if (slave.name ==~ /^build-slave[0-9]/) { | |
| println slave.name; | |
| println RemotingDiagnostics.executeGroovy(cmd, slave.getChannel()); |
| #include <string> | |
| template <auto Name> | |
| struct Int { private: int n; }; | |
| struct EI : Int<1>, virtual Int<2> {}; | |
| struct DI : virtual Int<2> {}; | |
| struct FI : EI, DI {}; | |
| struct DC { int a1; int a2; }; |
| #!/bin/bash | |
| set -eou pipefail | |
| if [[ $# != 1 ]]; then | |
| echo "Generates a shell script that reproduces the environment variables created by a batch file" | |
| echo "Usage: $0 <path-to-batch-file>" | |
| exit 1 | |
| fi |
| $$('.btn-link.text-gray').forEach(function(item){ | |
| if(item.innerHTML.match(/Show outdated/)){ | |
| item.dispatchEvent(new MouseEvent('click', { | |
| view: window, | |
| bubbles: true, | |
| cancelable: true | |
| })); | |
| } | |
| }); |
git diff -U1 |
perl -ne '
if (m|^\+\+\+ b/(.*)|) { $name = $1 }
if (m|^@@.*\+(\d+),(\d+)|) { $from = $1; $to = $from + $2; print "clang-format -lines=$from:$to -style=file -i $name\n" }
' |
sh
| #define SWITCH_ALL(value, ...) \ | |
| __pragma(warning(push)) \ | |
| __pragma(warning(error: 4061)) \ | |
| switch(value){ __VA_ARGS__ } \ | |
| __pragma(warning(pop)) |