Async, non-blocking post to multiple Discord Bot stats using axios and ES8 async/await.
/**
This is just a snippet (assumes you've defined a Discord client, etc)
**/
/** | |
* @license | |
* Copyright (C) 2013 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
### Giesela Inc OSS Individual Contributor License Agreement | |
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Giesela Inc or its affiliates (“Giesela”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Giesela in respect of any of the Projects (collectively “Contributions”). | |
If you have any questions respecting this Agreement, please contact us at git@giesela.io by e-mail or toll-free telephone (US): +1-855-556-4338, Europe (CH): +41 31 539 13 66. | |
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. |
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
openapi: 3.0.0 | |
servers: | |
- description: GiTils API | |
url: https://gitils.giesela.io | |
info: | |
description: API specification for GiTils. | |
version: "0.0.1" | |
title: GiTils | |
contact: | |
email: team@giesela.io |
/* PrismJS 1.15.0 | |
https://prismjs.com/download.html#themes=prism-twilight&languages=markup+css+clike+javascript+abap+actionscript+ada+apacheconf+apl+applescript+c+arff+asciidoc+asm6502+csharp+autohotkey+autoit+bash+basic+batch+bison+brainfuck+bro+cpp+aspnet+arduino+coffeescript+clojure+ruby+csp+css-extras+d+dart+diff+django+docker+eiffel+elixir+elm+markup-templating+erlang+fsharp+flow+fortran+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+http+hpkp+hsts+ichigojam+icon+inform7+ini+io+j+java+jolie+json+julia+keyman+kotlin+latex+less+liquid+lisp+livescript+lolcode+lua+makefile+markdown+erb+matlab+mel+mizar+monkey+n4js+nasm+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+perl+php+php-extras+sql+powershell+processing+prolog+properties+protobuf+pug+puppet+pure+python+q+qore+r+jsx+typescript+renpy+reason+rest+rip+roboconf+crystal+rust+sas+sass+scss+scala+scheme+smalltalk+smarty+plsql+soy+stylus+swift+yaml+tcl+textile+tt2+twig+tsx+vbnet+velocity+verilog+vhdl+vim+visual-basic |
Async, non-blocking post to multiple Discord Bot stats using axios and ES8 async/await.
/**
This is just a snippet (assumes you've defined a Discord client, etc)
**/
#!/bin/bash | |
# | |
# server-speedtest - An utility to test network quality and speeds on a server | |
# https://github.com/iceTwy/server-speedtest | |
# | |
function download_benchmark() { | |
DOWNLOAD_SPEED=`wget -O /dev/null $2 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}'` | |
echo "$1: $DOWNLOAD_SPEED ($2)" | |
} |
#!/bin/sh | |
echo "" | |
echo "NadekoBot pm2 Update Started. This will stop Nadeko safely in pm2, update it and restart the bot." | |
sleep 2 | |
if hash git 1>/dev/null 2>&1 | |
then | |
echo "" | |
echo "Git Installed." |
Create a new Session - pm2:
tmux works well for most enviornments, however, we can use pm2 which allows us to have more control and also more automation.
pm2 requires NodeJS/npm. If you don't have these already, you can get them the following ways:
Ubuntu/Debian systems can use curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
to install NodeJS.