Skip to content

Instantly share code, notes, and snippets.

View cmcsun's full-sized avatar
🇺🇦

Christopher McFee cmcsun

🇺🇦
  • New York, NY
View GitHub Profile
@cmcsun
cmcsun / 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

@cmcsun
cmcsun / 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)
@cmcsun
cmcsun / 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]);
}
@cmcsun
cmcsun / 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
@cmcsun
cmcsun / _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 /

~/.task$ task rc.debug.tls=3 sync init
Please confirm that you wish to upload all your pending tasks to the Taskserver (yes/no) yes
c: INFO Server certificate will be verified.
c: 3 ASSERT: extensions.c:65
Syncing with li1107-241.members.linode.com:9001
Configuration override rc.debug.tls:3
Could not connect to li1107-241.members.linode.com 9001
Sync failed. Could not connect to the Taskserver.
~/.task$ task diagnostics
task 2.5.1
Platform: Darwin
Compiler
Version: 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++11