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
const yargs = require('yargs/yargs') | |
const { hideBin } = require('yargs/helpers'); | |
const Database = require('wow-classic-items') | |
const items = new Database.Items() | |
const professions = new Database.Professions() | |
const zones = new Database.Zones() | |
const classes = new Database.Classes() |
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
use include_dir::{include_dir, Dir}; | |
static STATIC_DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/assets/webroot"); | |
fn ct_from_path(path: &str) -> &'static str { | |
let idx = path.rfind(".").unwrap_or_else(|| 0); | |
let suffix = path.get(idx..).unwrap_or_else(|| ".unknown"); | |
match suffix { |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<meta charset="utf-8"> | |
<script> | |
var passwordTypingTimer; | |
var passwordDoneTypingInterval = 400; | |
// $('#myModal').modal('show') | |
var passwordHelp = '<br>Try:<ul><li>Adding Special Symbols\n<li>Increasing the Length<li>Using Different case Letters<li>Numbers<li><a onclick="$(\'#breachInfo\').modal(\'show\')" href="#">About password breach data</a></ul>' |
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
import Crypto.Random.random as pycryptrand | |
import sys | |
def random_line(afile): | |
line = next(afile) | |
for num, aline in enumerate(afile): | |
if pycryptrand.randrange(num + 2): | |
continue | |
line = aline | |
return line |
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
import sublime, sublime_plugin, sublime | |
""" | |
A quick syntax error highlighter for python. Place in your sublime text | |
Packages/User directory | |
""" | |
class PyHelp(sublime_plugin.EventListener): | |
def on_modified(self, view): | |
view.erase_regions("pyhelp_highlight") |
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
import sys | |
class Graph(dict): | |
def __init__(self): | |
self.explored = {} | |
self.finishing = [] | |
self.times = {} | |
self.time = 0 | |
def add_v(self, v): |