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
# Rename the local branch to the new name | |
git branch -m <old_name> <new_name> | |
# Delete the old branch on remote - where <remote> is, for example, origin | |
git push <remote> --delete <old_name> | |
# Or shorter way to delete remote branch [:] | |
git push <remote> :<old_name> | |
# Prevent git from using the old name when pushing in the next step. |
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
Find the disk name | |
sudo lsblk | |
This will show you a list of disks. Usually the first disk is vda and bootable. The second disk will be vdb, third vdc etc. | |
vda will typically be split in to multiple partitions, e.g. vda1 (/boot) and vda2 (/). | |
The new disk will have no partitions and no mountpoint. | |
Format the new disk | |
sudo mkfs.ext4 /dev/vdX |
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
function uuidv4() { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); | |
return v.toString(16); | |
}); | |
} |
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
const uuidv4 = () => ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)); | |
console.log(uuidv4()); |
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
const njwt = require('njwt'); | |
const privateKey=` | |
-----BEGIN PRIVATE KEY----- | |
... | |
... | |
-----END PRIVATE KEY----- | |
` | |
const clientId = "test"; // Or load from configuration | |
const now = Math.floor( new Date().getTime() / 1000 ); // seconds since epoch |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
} |