Skip to content

Instantly share code, notes, and snippets.

Avatar

lw fs-c

View GitHub Profile
View test.js
javascript: (function() {
let domStyle = document.getElementById('domStylee');
if (domStyle) {
document.body.removeChild(domStyle);
return;
}
domStyle = document.createElement("style");
domStyle.setAttribute('id', 'domStylee');
domStyle.append(
['* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }'],
@fs-c
fs-c / rr-scrape.js
Created Jan 11, 2019
Stupidly basic RR scraping
View rr-scrape.js
/* This is probably breaking RR rules or something.
* I didn't test this but it should work.
*/
const { writeFileSync } = require('fs');
const { RoyalRoadAPI } = require('@l1lly/royalroadl-api');
const api = new RoyalRoadAPI();
const args = process.argv.splice(2);
View osu_human.c
// TODO: This function is retarded, fix it and add actual humanization.
void humanize_hitpoints(int total, hitpoint **points, int level)
{
if (!level) {
return;
}
int i, offset;
hitpoint *p = NULL;
View rrl-parser.js
const date = require('date.js');
const cheerio = require('cheerio');
const { readFileSync } = require('fs');
const html = readFileSync('active-popular.html', 'utf8');
const parseFiction = ($, el) => ({
image: $(el).find('img').attr('src'),
title: $(el).find('.fiction-title').children('a').text(),
id: $(el).find('.fiction-title').children('a').attr('href').split('/')[2],
View discordClient.js
const WS_VER = process.env.WS_VER || '6';
const WS_URL = `wss://gateway.discord.gg/?v=${WS_VER}&encoding=json`;
const WebSocket = require('ws');
const EventEmitter = require('events');
const debug = require('debug')('discord');
const { payloads } = require('./payloads');
const Client = module.exports = class extends EventEmitter {
View markdown.css
@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
View osticket_stepstaken.md

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.
View osticket_steps.md

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.

@fs-c
fs-c / sudoku_bruteforce.js
Created Oct 19, 2017
This is inefficient and stupid.
View sudoku_bruteforce.js
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.
*/
View BLS Coding.md

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.

You can’t perform that action at this time.