This gist contains service descriptors which may be used to automatically start and re-start Minecraft servers using systemd. This allows proper control of your server startup on modern Linux distributions and will automatically manage all required tasks on startup for you.
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
# Modifier Key (Super) | |
set $mod Mod4 | |
# No mouse focus | |
focus_follows_mouse no | |
# Font for window titles. Will also be used by the bar unless a different font | |
# is used in the bar {} block below. | |
font pango:Noto Sans 11 |
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
(function() { | |
var send = XMLHttpRequest.prototype.send, | |
token = $('meta[name=csrf-token]').attr('content'); | |
XMLHttpRequest.prototype.send = function(data) { | |
this.setRequestHeader('X-CSRF-Token', token); | |
return send.apply(this, arguments); | |
}; | |
}()); |
Based on this tutorial but simplified and inlined. Particularly removed any Rails and 3rd party services part, assumed you just need deployment to any Ubuntu machine.
- A functional Rails app
- Hosted Git repository (Github, Bitbucket, Gitlab)
- Cloud hosting account (Digital Ocean, Vultr, Linode, Lightsail)
- Local SSH account
install nodejs
sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
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
root# apt-get update | |
root# apt-get upgrade | |
// dependencies for Ruby | |
root# apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \ | |
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev \ | |
libpcre3-dev unzip | |
// Node.js v7 | |
root# curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - |
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
verbose: REQUEST for [POST] /parse/functions/testPush: { | |
"userId": "0lxi50to62", | |
"text": "Lorem ipsnum", | |
"dataPush": { | |
"subscriberId": "xku6EHzzwD", | |
"subscriberName": "Lorem", | |
"code": "6" | |
} | |
} method=POST, url=/parse/functions/testPush, x-real-ip=46.39.255.115, x-forwarded-for=46.39.255.115, x-nginx-proxy=true, host=jamline.ru, connection=close, content-length=153, x-parse-application-id=JAMFABRIC, content-type=application/json, x-parse-master-key=JAMKEY, user-agent=Paw/3.1.7 (Macintosh; OS X/10.13.6) GCDHTTPRequest, userId=0lxi50to62, text=Lorem ipsnum, subscriberId=xku6EHzzwD, subscriberName=lorem, code=6 | |
Sending push to user: 0lxi50to62 |
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
Parse.Cloud.define("testPush", async (request) => { | |
const {params, master, log, headers, ip, functionName} = request; | |
let userQuery = new Parse.Query(Parse.User); | |
userQuery.equalTo("objectId", params.userId); | |
// Find devices associated with these users | |
let pushQuery = new Parse.Query(Parse.Installation); | |
pushQuery.matchesKeyInQuery('deviceToken', 'deviceToken', userQuery); | |
// pushQuery.matchesKeyInQuery('user', userQuery); |
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
var express = require('express'); | |
var ParseServer = require('parse-server').ParseServer; | |
var app = express(); | |
var iosCertPath = process.env.PARSE_CERT || '../certs/my_cert.p12'; | |
var api = new ParseServer({ | |
databaseURI: 'mongodb://user:[email protected]:27017/db', // Connection string for your MongoDB database | |
cloud: './cloud/main.js', // Absolute path to your Cloud Code | |
appId: 'APPID', |
NewerOlder