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
#!/usr/bin/env bash | |
set -eo pipefail | |
#Set branch to master unless specified by the user | |
declare LV_BRANCH="${LV_BRANCH:-"master"}" | |
declare -r LV_REMOTE="${LV_REMOTE:-lunarvim/lunarvim.git}" | |
declare -r INSTALL_PREFIX="${INSTALL_PREFIX:-"$HOME/.local"}" | |
declare -r XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME/.local/share"}" | |
declare -r XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}" |
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
#!/bin/bash | |
# (C) Datadog, Inc. 2010-2016 | |
# All rights reserved | |
# Licensed under Simplified BSD License (see LICENSE) | |
# Datadog Agent installation script: install and set up the Agent on supported Linux distributions | |
# using the package manager and Datadog repositories. | |
set -e | |
install_script_version=1.0.0 | |
logfile="ddagent-install.log" |
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
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
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
curl --digest -u (username):(password) -X PUT -H "Content-type: application/json" -H "Accept:application/json" --data-binary "(false or true)" "http://(ipaddress)/restapi/relay/outlets/0/state/" |
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: ([.|\w|-])*\.(?:jpg|gif|png|svg) | |
replace: {{'$&' | asset_url}} |
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
exports = function(payload, response) { | |
// declare mongo services and db | |
const mongodb = context.services.get('<your-service-name>'); | |
const collection = mongodb.db('<your-db-name>').collection('<your-collection-name>'); | |
// json from webhook into insert function... | |
// convert body to EJSON for proper formatting | |
collection.insertOne({ | |
body: EJSON.parse(payload.body.text()), |
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
exports = function(payload, response) { | |
const mongodb = context.services.get('<your-service-name>'); | |
const collection = mongodb.db("<your-db-name>").collection("<your-collection-name>"); | |
var json = EJSON.parse(payload.body.text()); | |
var user = json.userId; | |
var status = json.orderStatus; | |
return collection | |
.updateOne( |
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
To fix for a manual gem install: | |
brew install openssl | |
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)" | |
To fix for all bundle installs: | |
brew install openssl | |
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)" | |
bundle install |
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
curl GET -H 'Content-Type: application/json' 'https://key:pass@shopname.myshopify.com/admin/orders.json' |
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
#!/bin/bash | |
echo "" | |
# Root check | |
if [[ "$UID" -ne 0 ]]; then | |
echo "!! This script requires root privileges. sudo ./create_koken.sh" | |
echo "" | |
exit | |
fi |
NewerOlder