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
| #!/usr/local/bin/python3 | |
| import re, subprocess, sys | |
| if len(sys.argv) < 2: | |
| print(''' | |
| This utility generates a protobuf file from an Objective C framework. It was developed against | |
| CloudKit/CloudKitDaemon, but may work with other libraries that are built the same way. | |
| ''') | |
| print("Usage:\n\t",sys.argv[0],"MachOBinary\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
| #include <time.h> // Robert Nystrom | |
| #include <stdio.h> // @munificentbob | |
| #include <stdlib.h> // for Ginny | |
| #define r return // 2008-2019 | |
| #define l(a, b, c, d) for (i y=a;y\ | |
| <b; y++) for (int x = c; x < d; x++) | |
| typedef int i;const i H=40;const i W | |
| =80;i m[40][80];i g(i x){r rand()%x; | |
| }void cave(i s){i w=g(10)+5;i h=g(6) | |
| +3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| const int H = 40; | |
| const int W = 80; | |
| char map[H][W]; | |
| int rnd(int max) { | |
| return rand() % max; |
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
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
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
| require Logger | |
| Logger.configure_backend(:console, format: "$time $metadata[$level] $levelpad$message\n") | |
| # more colores in | |
| # https://hexdocs.pm/elixir/1.12/IO.ANSI.html | |
| Logger.info("colorful log line", ansi_color: :black) | |
| Logger.info("colorful log line", ansi_color: :blue) | |
| Logger.info("colorful log line", ansi_color: :cyan) |
There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.
- UEFI system
- Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
- Windows installer USB
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
| #!/bin/bash | |
| gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
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
| bisect-stash-build-run.sh | |
| ----------8<---------- | |
| #!/bin/bash | |
| git stash apply || exit 125 | |
| # build the test | |
| # for a chromium/blink unittest, this is: | |
| # ( echo n | gclient sync ) || exit 125 | |
| # autoninja -C out/Debug blink_unittests || exit 125 | |
| # run the test |
OlderNewer