Skip to content

Instantly share code, notes, and snippets.

{
"eins": "one",
"zwei": "two",
"drei": "three"
}
@fs-c
fs-c / steam-activity.js
Last active August 4, 2017 18:28
Basic stuff. Made to fit my needs, but I feel like others will be able to have fun with it too. I run this on a server, but can be run wherever. Requires NodeJS and the steam-user and steam-totp modules.
// By default requires a JSON file with your steam account data,
// defined with the PATH variable.
// See steamdata.json for formatting.
// You can just define the accounts object yourself, just make sure
// to use the correct property names.
require('console-stamp')(console, 'HH:MM:ss.l')
const SteamUser = require('steam-user')
const steamtotp = require('steam-totp')
@fs-c
fs-c / whitespacer.js
Last active July 30, 2017 10:51
Input anything and the script will add enough spaces to make it appear centered on a FullHD steam client. The result is saved in the clipboard and output in the console. This is a proof of concept or whatever.
// On FullHD in steam client, a custom info box is 90 spaces wide.
// This code WORKS, but it's ugly and not well thought out.
// Look at this as a proof of concept if you will.
const SPACE = ' '
const cp = require('copy-paste')
const rl = require('readline').createInterface({
input: process.stdin,
output: process.stdout
})
const SteamUser = require('steam-user') // npm install steam-user
const MSG = `Default message.`
const ACCOUNT = {
accountName: '',
password: ''
}
let client = new SteamUser()
client.on('loggedOn', details => {
console.log(`Logged on with ${client.steamID.getSteamID64()}.`)
client.setPersona(SteamUser.EPersonaState.Online)
client.gamesPlayed([730]) // Set game to csgo.
client.on('friendMessage', (steamID, message) => {
console.log(config.options.chatResponse.commands[message])
client.chatMessage(id, config.options.chatResponse.unknownCommand)
})

The following tests are designed to help filter out the 95% of "programmers" who claim to have coding skills but can't seem to program their way out of a wet paper bag.

Note that your application to bluestreak will not necessarily get denied if you are unable to solve one or more of these tests, but it'd probably be a good idea to stop claiming to be a programmer after that.

Also know that I will ask detailed questions about your code and logic, if I feel like you did not make it yourself.

@fs-c
fs-c / sudoku_bruteforce.js
Created October 19, 2017 16:39
This is inefficient and stupid.
let raw = [ 0, 4, 0, 0, 8, 3, 0, 6, 0, 6, 0, 7, 0, 0, 0, 4, 0, 0, 3, 0, 0, 0, 6, 0, 2, 9, 0, 0, 0, 4, 0, 1, 0, 9, 2, 6, 9, 0, 0, 0, 3, 0, 0, 0, 8, 8, 2, 6, 0, 7, 0, 5, 0, 0, 0, 7, 9, 0, 5, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 3, 0, 9, 0, 6, 0, 1, 9, 0, 0, 7, 0 ]
class Sudoku {
constructor (raw) {
this.raw = raw
}
/**
* @return an array of rows.
*/

Key

Server A will be the machine that is being migrated from, with server B being the target machine. The same scheme applies to database (DB) A and B.

Steps

I would like to encourage you to use a search engine of your choice to attempt and resolve any issues that may arise - you will find that there are more than enough guides, tutorials and articles on virtually any problem you may face.

Key

Server A is the machine that is being migrated from, with server B being the target machine. The same scheme applies to database (DB) A and B.

Steps taken

  1. Dump DB A and move to server B.

    • Dumped and moved.
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAA