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
import { writable } from 'svelte/store' | |
// returns a store with HTTP access functions for get, post, patch, delete | |
// anytime an HTTP request is made, the store is updated and all subscribers are notified. | |
export default function(initial) { | |
// create the underlying store | |
const store = writable(initial) | |
// define a request function that will do `fetch` and update store when request finishes | |
store.request = async (method, url, params=null) => { |
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
QBITTORRENT_PATH=<PATH> | |
QBITTORRENT_WEBUI_PORT=<PORT> | |
DOWNLOAD_PATH=<PATH> | |
MEDIA_PATH=<PATH> | |
JACKETT_PATH=<PATH> | |
SONARR_PATH=<PATH> | |
RADARR_PATH=<PATH> | |
DOMAIN=<YOUR DOMAIN> | |
TZ=<Timezone e.g. Europe/Budapest> | |
USERDIR=<HOME DIR PATH> |
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
# Author: ALiangLiang <[email protected]> | |
# Replace VPN_NAME, ADDRESS and ACCOUNT first!! | |
# Ref: https://docs.microsoft.com/en-us/powershell/module/vpnclient/add-vpnconnection?view=win10-ps | |
$VPN_NAME = 'VPN' | |
$ADDRESS = 'vpn.example.com' | |
$ACCOUNT = 'user1' | |
function Connect { |
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
import { Knex } from 'knex' | |
export async function up(knex: Knex): Promise<any> { | |
await knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => { | |
table.integer('foobar'); | |
}); | |
} | |
export async function down(knex: Knex): Promise<any> { | |
await knex.schema.dropTable('test_setup'); |
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
<# | |
.SYNOPSIS | |
Script to Initialize my custom powershell setup. | |
.DESCRIPTION | |
Script uses scoop | |
.NOTES | |
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted. | |
Author: Mike Pruett | |
Date: October 18th, 2018 |
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
# - name: Generate DH Params (may take several minutes!) | |
# command: openssl dhparam \ | |
# -out "/data/jenkins_home/ssl/dhparam.pem" 2048 | |
# args: | |
# creates: "/data/jenkins_home/ssl/dhparam.pem" | |
# | |
# - name: Generate ECC Key | |
# command: openssl ecparam \ | |
# -genkey \ | |
# -name prime256v1 \ |
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
Put this in your `local-configure.yml` file, add as many users as you need: | |
users: | |
- name: fulvio | |
sudoer: yes | |
auth_key: ssh-rsa blahblahblahsomekey this is actually the public key in cleartext | |
- name: plone_buildout | |
group: plone_group | |
sudoer: no | |
auth_key: ssh-rsa blahblahblah ansible-generated on default |
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
local index1, index2 | |
set index1 to 3 -- 1920 x 1200 | |
set index2 to 4 -- 1280 x 800 | |
-- Launch "System Preferences", open the "Displays" options and change to the "Display" tab | |
tell application "System Preferences" | |
activate | |
set the current pane to pane id "com.apple.preference.displays" | |
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays" |
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
# place to git, ipkg, another shell commands | |
PATH=/volume1/@optware/bin:$PATH | |
export PATH | |
# more useful prompt shell | |
#PS1="`hostname`> " | |
PS1='\u@\h:\w' | |
case `id -u` in | |
0) PS1="${PS1}# ";; |
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
/** | |
* Custom "toHaveClass" matcher. | |
* | |
* Based on https://gist.github.com/darthwade/9305669 | |
* and https://gist.github.com/elgalu/94284ec0ac3e8a590507 | |
* | |
* usage : | |
* require('./toHaveClass.js'); | |
* ... | |
* expect($('html')).toHaveClass('wf-active'); |
NewerOlder