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
try { | |
await db.collection('users').create({ | |
name, | |
email, | |
phone, | |
password | |
}) | |
} catch (error) { | |
if (error.code == 11000) { | |
const duplicated = error.match(/index:\s([a-z]+)/i); |
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
#include <amxmodx> | |
#include <sockets> | |
#define MAX_INFO_LEN 1400 | |
#define MAX_INFO_FORMAT 100 | |
// A2S_INFO definitions for source according to http://developer.valvesoftware.com/wiki/Server_Queries#Source_servers_2 | |
#define A2S_INFO "^xFF^xFF^xFF^xFF^x54Source Engine Query^x00" | |
#define A2S_INFO_LEN 25 |
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
.markdown-body { | |
font-size: 15px; | |
line-height: 1.7; | |
overflow: hidden; } | |
.markdown-body > *:first-child { | |
margin-top: 0 !important; } | |
.markdown-body > *:last-child { | |
margin-bottom: 0 !important; } | |
.markdown-body a.absent { | |
color: #c00; } |
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
#!/bin/bash | |
gdrive_name=gdrive | |
gdrive_bin=/usr/bin/$gdrive_name | |
if [ -f $gdrive_name ] ; then | |
echo "$gdrive_name already existe, probably it's installed..." | |
exit 0 | |
else | |
echo "Downloading Google Drive | Script for Linux x64..." |
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
#!/bin/bash | |
gdrive_name=gdrive | |
gdrive_bin=/usr/bin/$gdrive_name | |
if [ -f $gdrive_name ] ; then | |
echo "$gdrive_name already existe, probably it's installed..." | |
exit 0 | |
else | |
echo "Downloading Google Drive | Script for Linux x64..." |
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
#!/bin/bash | |
gdrive_name=gdrive | |
gdrive_bin=/usr/bin/$gdrive_name | |
if [ -f $gdrive_name ] ; then | |
echo "$gdrive_name already existe, probably it's installed..." | |
exit 0 | |
else | |
echo "Downloading Google Drive | Script for Linux x64..." |
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
#!/bin/bash | |
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
unzip ngrok-stable-linux-amd64.zip | |
rm ngrok-stable-linux-amd64.zip | |
chmod 755 ngrok | |
mv ngrok /usr/bin/ |
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
# Source: https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string | |
sed -e '1h;2,$H;$!d;g' -e 's/__YOUR_REGEX_GOES_HERE__...' | |
# Source: https://blog.stathat.com/2012/10/11/refactoring_with_sed.html | |
sed -i "" 's/uc.User.Data.ApiKey/uc.User.ApiKey()/g' **/*.go | |
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
#!/bin/bash | |
# SRCDS Server | |
# FastDL Creator | |
# Author : Robin Labadie aka UltimateByte | |
# Website : http://www.lrob.fr for http://www.mesnie.org | |
# Version : 1.2 | |
# README | |
# This script is intended to work only for Valve SRCDS (Source) servers using Daniel Gibbs Linux Game Servers Management script | |
# It's been tested for Debian 8 but other debian and distros should also work |
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
; AMX Mod X plugins | |
; Admin Base - Always one has to be activated | |
admin.amxx ; admin base (required for any admin-related) | |
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) | |
; Basic | |
admincmd.amxx ; basic admin console commands | |
;adminhelp.amxx ; help command for admin console commands | |
;adminslots.amxx ; slot reservation |