-
Take your photo using the Android app IDPhoto and select the required ID format (passport, visa, etc.). Download it here: https://play.google.com/store/apps/details?id=idphoto.passport.portrait&hl=en_US
-
Upload the image to IDPhoto4You to generate a printable 4×6-inch layout (typically fits 8 ID photos on one sheet): https://www.idphoto4you.com/
-
Print the 4×6 photo at Walgreens, CVS, or any local photo kiosk. The total cost is usually under $1 for 8 valid ID photos.
| import requests | |
| from datetime import datetime, timedelta | |
| from collections import Counter | |
| # Configuration | |
| GITHUB_TOKEN = "ghp_***" # Replace with your GitHub token | |
| ORG_NAME = "ORG" # Replace with your organization name | |
| BASE_URL = "https://api.github.com" | |
| HEADERS = {"Authorization": f"Bearer {GITHUB_TOKEN}"} | |
| START_DATE = (datetime.utcnow() - timedelta(days=90)).isoformat() + "Z" # GitHub API expects ISO8601 format |
| #!/bin/bash | |
| # URL of the stream | |
| STREAM_URL="https://audio-edge-es6pf.mia.g.radiomast.io/a0f4514e-9045-4114-a4cf-17eb3246785a" | |
| # Directory to save the chunks | |
| OUTPUT_DIR="/tmp" | |
| # Base name for the output files | |
| BASE_NAME="bkk.fm" |
| # Install Pillow, an image processing library | |
| # pip install pillow | |
| from PIL import Image, ImageDraw | |
| def create_diagonal_sk_flag(size, top_band_color, bottom_band_color): | |
| # Create a blank white image | |
| img = Image.new("RGB", (size, size), (252, 252, 252)) | |
| draw = ImageDraw.Draw(img) |
I came across this quite randomly while experimenting with the headers of my browser. However, I wanted to share it with others because it's a useful hack.
If you visit any GitHub project, for example: https://github.com/duckduckgo/content-scope-scripts, it will be rendered in HTML. Now, if you add the header accept: application/json, the output will be fully in JSON.
Seems obvious? But it could be quite useful if you're into web scraping.
Try it:
To keep a container running indefinitely using a Dockerfile, you need to specify the appropriate command or entrypoint that will keep the container alive. Here's an example of how you can achieve this:
- Create a Dockerfile:
FROM <base_image>
# Add your application code or configuration files, if any
# Specify the command or entrypoint to keep the container running
CMD ["tail", "-f", "/dev/null"]
Let's suppose you are facing the following use case:
Randomly copy 100 photos out of thousands in a directory, and you are on a mac.
Here is the command to achieve that:
pwd | xargs -I % find % -type f | sort -R | head -n NUMBER_OF_RANDOM_FILES | xargs -I % echo "%" | xargs -I{} cp "{}" YOUR_DESTINATION_PATH
Run this command in the source directory, and replace NUMBER_OF_RANDOM_FILES (ex: 5) and YOUR_DESTINATION_PATH (ex: ~/Desktop/).
Are you tired on seeing Wikipedia on the top of all your search results?
Here is a small guide to help you hiding it for goods:
Supposing you are using Chrome or Brave, (1) first install the extension named Tampermonkey. Tampermonkey is used to run so-called userscripts on websites. Userscripts are small computer programs that change the layout of a page, add or remove new functionality and content, or automate actions.
Then (2) install the userscript named Google Hit Hider by Domain (Search Filter / Block Sites) by Jefferson "jscher2000" Scher.
Finally (3) go to any Google Search page, click on the extension, and in Manage Hiding, add wikipedia.org to the list of blocked websites.
| This is a process to recover the space taken by updates files on your OSX device: | |
| 1. Reboot your machine and keep ⌘ + R pressed. | |
| 2. This will start the Recovery system. | |
| 3. Open a terminal in there and type "csrutil disable" | |
| 4. Restart your machine. | |
| 5. Your can now delete any files in `~/Library/Updates` and you'll most likely get several GB of space back. |
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "fmt" | |
| ) | |
| func main() { |