Skip to content

Instantly share code, notes, and snippets.

node-gyp.cmd : gyp info it worked if it ends with ok
At line:1 char:1
+ node-gyp.cmd rebuild --dist-url=https://electronjs.org/headers --targ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (gyp info it worked if it ends with ok:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
gyp verb cli [
gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\Mr Spock\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
2021-02-04T03:20:10.954Z electron-packager Electron Packager 15.2.0
Node v14.15.4
Host Operating system: linux 5.10.12-gentoo (x64)
2021-02-04T03:20:10.955Z electron-packager Packager Options: {"_":["."],"electron-version":"11.2.2","electronVersion":"11.2.2","deref-symlinks":true,"derefSymlinks":true,"download":{"rejectUnauthorized":true,"reject-unauthorized":true},"junk":true,"prune":true,"dir":".","protocols":[]}
2021-02-04T03:20:10.955Z electron-packager Target Platforms: linux
2021-02-04T03:20:10.955Z electron-packager Target Architectures: x64
Thu, 04 Feb 2021 03:20:10 GMT get-package-info Getting props: [ [ 'productName', 'name' ], 'version' ]
Thu, 04 Feb 2021 03:20:10 GMT get-package-info Looking up starting from directory: /home/simo/tmp/epp/electron-quick-start
Thu, 04 Feb 2021 03:20:10 GMT get-package-info Result so far: { values: {}, source: {} }
Thu, 04 Feb 2021 03:20:10 GMT get-package-info Checking props in package.json found at: /home/simo/tmp/epp/electron-quick-start/package.json
@simotukiainen
simotukiainen / edit-s3.sh
Last active December 13, 2020 09:39
A helper to edit e.g configuration files in S3 painlessly and with less mistakes.
#!/bin/sh
# A helper to edit files in S3.
usage () {
echo "Usage: `basename $0` [-r region] s3://bucket/key" >&2
echo "OPTIONS" >&2
echo " -r region AWS region to use. If not given, awscli default is used." >&2
}
@simotukiainen
simotukiainen / local_pg
Last active November 26, 2020 08:15
A project-specifically intelligent helper to start, stop and psql a non-persistent local PostgreSQL in Docker.
#!/bin/sh
# Assumed to reside in bin/ subdirectory of the project.
cd "`dirname $0`"/.. || exit 1
PROG=`basename $0`
CONFIG_FILE=.local/config.yaml
CONTAINER_NAME=local_pg_dev
IMAGE_NAME=postgres:latest
@simotukiainen
simotukiainen / awsdo
Last active September 11, 2020 10:42
A script to run commands that use AWS with credentials stored using pass (https://www.passwordstore.org/)
#!/bin/sh
# You have to save your password file as:
# <secret access key>
# <access key id>
eval `pass show my-aws-credentials | (read a && read b && echo "export AWS_SECRET_ACCESS_KEY=\"$a\"; export AWS_ACCESS_KEY_ID=\"$b\"")`
if [ $# -gt 0 ]; then
exec "$@"
else
exec $SHELL
fi
@simotukiainen
simotukiainen / lambda_function.py
Created April 21, 2020 16:14
A Cloudfront Lambda@Edge that canonicalizes directory trailing slashes using 301 moved permanently for directories in a static site. Also handles some default document mappings as request rewrites and www -> naked domain redirection.
import re
FILE_MATCHER = re.compile(".*/[^/]+\\.[^/]+$")
def lambda_handler(event, context):
request = event["Records"][0]["cf"]["request"]
@simotukiainen
simotukiainen / mysql_dump_table_columns.sh
Last active April 2, 2020 07:04
A script to dump tables and columns with type information in a MySQL database e.g to compare two databases using diff
#!/bin/sh
# This script accepts the same options as mysql client
exec mysql -B "$@" <<EOF
select table_name, column_name, column_type,column_default, is_nullable
from information_schema.columns
where table_schema = database()
order by table_name, column_name
EOF