Skip to content

Instantly share code, notes, and snippets.

View cmcsun's full-sized avatar

Christopher McFee cmcsun

  • New York, NY
View GitHub Profile
View gist:628512dbf6af83ca0a1ed82605af93bd
scrape_interval: 15s
evaluation_interval: 15s
monitor: 'docker-host-alpha'
- 'alert.rules'
- /core.rules
View gist:8b5427e8c022c0571ca8e0836f65b118

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

$ git clone ~/.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 /
Created October 26, 2023 05:03 — forked from wpscholar/
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 /
Created July 30, 2018 23:07
import threading, zipfile, time
class AsyncZip(threading.Thread):
def __init__(self, infile, outfile):
self.infile = infile
self.outfile = outfile
def run(self):
f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED)
View sol2.cpp
class Solution {
bool containsDuplicate(vector<int>& nums) {
std::vector<int> sorted;
//bool containsDuplicated=false;
for (int i=0; i<nums.size(); i++)
cmcsun / unreal
Created April 9, 2017 03:18
View unreal
cmcsun /
Created May 14, 2016 16:06 — forked from bzerangue/
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 /

View gist:64018b4f9722694e3e248424446b3996
~/.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
Configuration override rc.debug.tls:3
Could not connect to 9001
Sync failed. Could not connect to the Taskserver.
View gist:89ef58b4a4af86e93cede9e4fa65a9ae
~/.task$ task diagnostics
task 2.5.1
Platform: Darwin
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
View gist:c967afb34d568b8f42ea9b17857390ee
CSDUJ[16:38]raina@rainacloud~$ taskd diagnostics --data /home/raina/taskdata/
taskd 1.1.0
Platform: Linux
Hostname: rainacloud
Version: 4.9.3
Caps: +stdc +stdc_hosted +200809 +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++11