Skip to content

Instantly share code, notes, and snippets.

View chrismcfee's full-sized avatar
🇺🇦
Working from home

Chris McFee chrismcfee

🇺🇦
Working from home
View GitHub Profile
define([
"renderer/modules/workerPromise",
"renderer/modules/monitor.webgl",
"renderer/modules/monitor",
], function (WorkerPromise) {
"use strict";
const ZCAST_PLAYERS = [];
const ONE_MINUTE = 60000;
const ONE_HOUR = 60 * ONE_MINUTE;
const w = self;
const RSS_DB = new Promise(function (resolve, reject) {
var request = indexedDB.open('rssdata', 1);
request.onerror = function (e) {
reject("Database error: " + e.target.errorCode);
};
request.onsuccess = function (e) {
resolve(e.target.result);
};
request.onupgradeneeded = function (e) {
@chrismcfee
chrismcfee / weechatrelay-letsencrypt.md
Created March 21, 2024 16:24 — forked from meskarune/weechatrelay-letsencrypt.md
weechat relay with ssl certificates from let's encrypt
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'docker-host-alpha'
rule_files:
- 'alert.rules'
- /core.rules

after install neovim nvim config file folder ~/.config/nvim

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/nvim/bundle/Vundle.vim

set nocompatible              " be iMproved, required
filetype off                  " required
" set the runtime path to include Vundle and initialize

set rtp+=~/.vim/bundle/Vundle.vim

@chrismcfee
chrismcfee / vagrant-cheat-sheet.md
Created October 26, 2023 05:03 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@chrismcfee
chrismcfee / multithread.py
Created July 30, 2018 23:07
multithread.py
import threading, zipfile, time
class AsyncZip(threading.Thread):
def __init__(self, infile, outfile):
threading.Thread.__init__(self)
self.infile = infile
self.outfile = outfile
def run(self):
f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED)
class Solution {
public:
bool containsDuplicate(vector<int>& nums) {
std::vector<int> sorted;
//bool containsDuplicated=false;
for (int i=0; i<nums.size(); i++)
{
sorted.push_back(nums[i]);
}
@chrismcfee
chrismcfee / unreal
Created April 9, 2017 03:18
unreal
https://codetalk.io/posts/2015-11-18-setting-up-unrealircd-and-anope-on-ec2.html#sasl-support
https://www.unrealircd.org/download/4.0/4.0.10/src
https://www.unrealircd.org/docs/Installing_from_source
https://www.unrealircd.org/docs/Upgrading_from_3.2.x
https://www.unrealircd.org/docs/UnrealIRCd_files_and_directories
https://www.anope.org/faq.php?cat=1#4
http://www.techmansworld.com/2014/03/upgrading-from-anope-18-to-anope-20.html
@chrismcfee
chrismcfee / _verify-repair-permissions-disk.md
Created May 14, 2016 16:06 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /