brew install ag
ide $(ag x -G y -l)
Open with android studio all files from current direct containing the word "order" and file name contains Activity.java
studio $(ag order -G Activity.java -l)
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <stdbool.h> | |
| typedef int8_t i8; | |
| typedef int16_t i16; | |
| typedef int32_t i32; | |
| typedef int64_t i64; | |
| typedef uint8_t u8; |
| #!/bin/sh | |
| print_usage() { | |
| echo "usage: compress_video <input_file>" | |
| echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
| } | |
| get_extension() { | |
| f="${1##*/}" | |
| case "$f" in |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <windows.h> | |
| #pragma comment( lib, "user32.lib" ) | |
| #pragma comment( lib, "gdi32.lib" ) | |
| #define SCRW 640 | |
| #define SCRH 480 |
| struct Webview: UIViewControllerRepresentable { | |
| let url: URL | |
| func makeUIViewController(context: Context) -> WebviewController { | |
| let webviewController = WebviewController() | |
| let request = URLRequest(url: self.url, cachePolicy: .returnCacheDataElseLoad) | |
| webviewController.webview.load(request) | |
| return webviewController |
| #!/usr/bin/env python3 | |
| # Distributed under the MIT software license | |
| import binascii, struct, sys, io, argparse | |
| from PIL import Image | |
| IMG_WIDTH = 512 # could be made adaptive... | |
| MIN_HEIGHT = 4 # minimum height of image; twitter won't let us upload anything smaller | |
| BYTES_PER_PIXEL = 4 # RGBA, 8 bit | |
| def div_roundup(x,y): |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |