- Update
package.json
, setversion
to a prerelease version, e.g.2.0.0-rc1
,3.1.5-rc4
, ... - Run
npm pack
to create package - Run
npm publish <package>.tgz --tag next
to publish the package under thenext
tag - Run
npm install --save package@next
to install prerelease package
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
CONTEXT="$1" | |
if [[ -z ${CONTEXT} ]]; then | |
echo "Usage: $0 KUBE-CONTEXT" | |
exit 1 | |
fi |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/apex/go-apex" | |
"github.com/apex/go-apex/proxy" | |
) |
This file contains hidden or 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
var React = { | |
createElement: function (tag, attrs, children) { | |
var e = document.createElement(tag); | |
// Add attributes | |
for (var name in attrs) { | |
if (name && attrs.hasOwnProperty(name)) { | |
var v = attrs[name]; | |
if (v === true) { | |
e.setAttribute(name, name); |
This file contains hidden or 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
#!/usr/bin/env python | |
import os | |
import time | |
import json | |
import base64 | |
import requests | |
import argparse | |
from base64 import urlsafe_b64decode, b64decode | |
from Crypto.Hash import SHA256, SHA512 |
I’m struggling with providing sensitive information like a password or api key to a Lambda:
In the AWS docs it says: When you create or update Lambda functions that use environment variables, AWS Lambda encrypts them using the AWS Key Management Service.
But they also mention
Storing Sensitive Information
For sensitive information, such as database passwords, we recommend you use client-side encryption using
This guide is based on the hibernate article from the Arch wiki.
- edit
/etc/default/grub
and addresume
as well asresume_offset
kernel parametersresume=UUID=abcd-efgh
contains the UUID of the partition on which the swapfile resides. In most cases theswapfile
resides inroot
, to identify theroot
parition's UUID runblkid
orlsblk -O
.resume_offset=1234
is the offset of the swapfile from the partition start. The offset is the first entry in thephysical_offset
column of the output offilefrag -v /swapfile
.- update grub:
grub-mkconfig -o /boot/grub/grub.cfg
- example:
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=75972c96-f909-4419-aba4-80c1b74bd605 resume_offset=1492992"
- add the
resume
module hook to/etc/mkinitcpio.conf
:HOOKS="base udev resume autodetect ...
- rebuild the initramfs
mkinitcpio -p linux
This file contains hidden or 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
<key name="Palette1" modified="2016-11-18 17:52:55" build="160710"> | |
<value name="Name" type="string" data="Snazzy"/> | |
<value name="ExtendColors" type="hex" data="00"/> | |
<value name="ExtendColorIdx" type="hex" data="00362a28"/> | |
<value name="TextColorIdx" type="hex" data="00ebf0ef"/> | |
<value name="BackColorIdx" type="hex" data="00362a28"/> | |
<value name="PopTextColorIdx" type="hex" data="00ebf0ef"/> | |
<value name="PopBackColorIdx" type="hex" data="00362a28"/> | |
<value name="ColorTable00" type="dword" data="00362a28"/> | |
<value name="ColorTable01" type="dword" data="00ffc757"/> |
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
- Don't use
Math.random()
. There are extremely few cases whereMath.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case. - Don't use
crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable. - If you want to generate random tokens or API keys: Use
uuid
, specifically theuuid.v4()
method. Avoidnode-uuid
- it's not the same package, and doesn't produce reliably secure random values. - If you want to generate random numbers in a range: Use
random-number-csprng
.
You should seriously consider reading the entire article, though - it's