Regular expressions to check if a given GitHub token could be valid.
| import os | |
| from datetime import datetime, timedelta | |
| from typing import Any, Dict, Generator, List, Union | |
| import requests | |
| # Optional - to connect using OAuth credentials | |
| from oauthlib.oauth1 import SIGNATURE_RSA | |
| class JiraClient: | |
| def __init__( |
This is a sample script for modifying the revisions of a file on Google Drive using Google Apps Script. This script can be used for not only Google Docs files, but also the files except for Google Docs.
Unfortunately, in the current stage, at Google Docs files, the revision of Google Docs cannot be directly changed by APIs with a script. So as one of several workarounds, I would like to propose to overwrite the Google Docs file using the exported data. On the other hand, at the files except for Google Docs, the data can be directly retrieved with the revision ID. This can be used for overwriting the file. The flow of this script is as follows.
| #!/bin/sh | |
| set -e | |
| ## SEE https://medium.com/@ebuschini/iptables-and-docker-95e2496f0b45 | |
| ## You need to add rules in DOCKER-BLOCK AND INPUT for traffic that does not go to a container. | |
| ## You only need to add one rule if the traffic goes to the container | |
| CWD=$(cd "$(dirname "${0}")"; pwd -P) | |
| FILE="${CWD}/$(basename "${0}")" |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| #!/bin/sh | |
| agr () { | |
| # find and replace | |
| regex=s/${1}/${2}/g; | |
| ag $1 -l | xargs sed -i.agr_backup $regex; | |
| # delete backups | |
| ag -G .agr_backup -l | xargs rm | |
| } |
- Tell me about yourself.
- Tell me about the most boring job you have ever had.
- What changes would you make if you came on board?
- What would you say to your boss if he is crazy about an idea, but you think it stinks?
- Assuming that you are selected, what will be your strategy for next 60 days?
- why are not you earning more money at this stage of your career?
Technical details for https://stackoverflow.com/a/44169445/6730571
On a base system, /usr/bin/java is a symlink that points to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, which is an Apple wrapper tool that locates and executes the actual java.
(Do not touch anything in those 2 system directories. It should actually be impossible due to "System Integrity Protection" anyway.)
If you don't have Java installed, attempting to execute java will open a dialog that invites you to install it.