This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.
This file contains 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
angular.module('demo').service('imageService', function ($http, $q, $timeout) { | |
var NUM_LOBES = 3 | |
var lanczos = lanczosGenerator(NUM_LOBES) | |
// resize via lanczos-sinc convolution | |
this.resize = function (img, width, height) { | |
var self = { } | |
self.type = "image/png" | |
self.quality = 1.0 |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'
The only information that aren't fetched are:
%B
: raw body (unwrapped subject and body)%GG
: raw verification message from GPG for a signed commit
This file contains 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
/** | |
* Generates a MongoDB-style ObjectId in Node.js. Uses nanosecond timestamp in place of counter; | |
* should be impossible for same process to generate multiple objectId in same nanosecond? (clock | |
* drift can result in an *extremely* remote possibility of id conflicts). | |
* | |
* @returns {string} Id in same format as MongoDB ObjectId. | |
*/ | |
function objectId() { | |
const os = require('os'); | |
const crypto = require('crypto'); |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
This file contains 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
version: '3.1' | |
services: | |
registry: | |
restart: always | |
image: registry:2 | |
volumes: | |
- registry:/var/lib/registry | |
environment: | |
- REGISTRY_HTTP_ADDR=0.0.0.0:5000 |
Component with popup using Angular CDK Overlay
Template:
<ng-template #templateRef>
Popup content
</ng-template>
OlderNewer