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
| apple#!/bin/bash | |
| VERSION="1.3.1" | |
| SDKVERSION_IPHONE="14.5" | |
| ARCHS_DEVICES_IPHONE="arm64e armv7" | |
| ARCHS_SIMULATOR_IPHONE="x86_64 arm64" | |
| SDKVERSION_WATCH="7.4" | |
| ARCHS_DEVICES_WATCH="arm64_32 armv7k" |
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
| // shift mapping for KeyboardEvent.key | |
| const lowerToUpper: Record<string, string> = {}; | |
| for (let a = 'a'.charCodeAt(0); a <= 'z'.charCodeAt(0); a += 1) { | |
| lowerToUpper[a] = String.fromCharCode(a).toUpperCase(); | |
| } | |
| const ShiftMapping: Record<string, string> = { | |
| '`': '~', | |
| '1': '!', | |
| '2': '@', |
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
| void GetUnicodeChar(unsigned int code, char chars[5]) { | |
| if (code <= 0x7F) { | |
| chars[0] = (code & 0x7F); chars[1] = '\0'; | |
| } else if (code <= 0x7FF) { | |
| // one continuation byte | |
| chars[1] = 0x80 | (code & 0x3F); code = (code >> 6); | |
| chars[0] = 0xC0 | (code & 0x1F); chars[2] = '\0'; | |
| } else if (code <= 0xFFFF) { | |
| // two continuation bytes | |
| chars[2] = 0x80 | (code & 0x3F); code = (code >> 6); |
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
| # Makefile for gtest examples | |
| GOOGLE_TEST_LIB = gtest | |
| GOOGLE_TEST_INCLUDE = /usr/local/include | |
| G++ = g++ | |
| G++_FLAGS = -c -Wall -I $(GOOGLE_TEST_INCLUDE) | |
| LD_FLAGS = -L /usr/local/lib -l $(GOOGLE_TEST_LIB) -l pthread | |
| OBJECTS = main.o string-compare.o |
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
| # Makefile for gtest examples | |
| GOOGLE_TEST_LIB = gtest | |
| GOOGLE_TEST_INCLUDE = /usr/local/include | |
| G++ = g++ | |
| G++_FLAGS = -c -Wall -I $(GOOGLE_TEST_INCLUDE) | |
| LD_FLAGS = -L /usr/local/lib -l $(GOOGLE_TEST_LIB) -l pthread | |
| OBJECTS = main.o string-compare.o |
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 | |
| # git pre-commit hook that runs an clang-format stylecheck. | |
| # Features: | |
| # - abort commit when commit does not comply with the style guidelines | |
| # - create a patch of the proposed style changes | |
| # modifications for clang-format by rene.milk@wwu.de | |
| # This file is part of a set of unofficial pre-commit hooks available | |
| # at github. |
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
| tell application "Xcode" | |
| set last_word_in_main_window to (word -1 of (get name of window 1)) | |
| if (last_word_in_main_window is "Edited") then | |
| display dialog "Please save the current document and try again" | |
| -- eventually we could automatically save the document when this becomes annoying | |
| else | |
| set current_document to document 1 whose name ends with last_word_in_main_window | |
| set current_document_path to path of current_document | |
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
| (setq pidfile "emacs-server.pid") | |
| (add-hook 'emacs-startup-hook | |
| (lambda () | |
| (with-temp-file pidfile | |
| (insert (number-to-string (emacs-pid)))))) | |
| (add-hook 'kill-emacs-hook | |
| (lambda () | |
| (when (file-exists-p pidfile) | |
| (delete-file pidfile)))) |
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
| [Unit] | |
| Description=Redis In-Memory Data Store | |
| After=network.target | |
| [Service] | |
| User=redis | |
| Group=redis | |
| LimitCORE=infinity | |
| LimitNOFILE=100000 | |
| LimitNPROC=100000 |
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
| [filter "lfs"] | |
| clean = git-lfs clean %f | |
| smudge = git-lfs smudge %f | |
| required = true | |
| [push] | |
| default = simple | |
| [alias] | |
| co = checkout | |
| br = branch | |
| cm = commit |
NewerOlder