Skip to content

Instantly share code, notes, and snippets.

@zooxyt
zooxyt / dot.vimrc
Created October 31, 2017 08:30
.vimrc
" Cheryl's Dot Vim File
" 10.31.2017
"
" sudo apt-get install ack silversearcher-ag xterm
" Language
if (has("win32") || has("win64") || has("win32unix"))
let $LANG = 'en'
set langmenu=en
endif

sudo apt-get install libncurses-dev libgnome2-dev libgnomeui-dev
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev
libx11-dev libxpm-dev libxt-dev
ruby-dev python-dev python3-dev lua-dev

git clone https://github.com/vim/vim.git vd vim ./configure --with-features=huge
--enable-multibyte
--enable-rubyinterp=yes \

/* Enhanced C : Container : List
* Copyright(c) 2017 Cheryl Natsu */
/* Container which supports constant time insertion and removel from anywhere
* inside.
*
* Usage:
*
*
* In header (.h file):
#!/usr/env/bin python2
# Example:
# python cut.py 00000.txt "1,6,11,16"
import sys
def chapter_time_to_millisec(s):
d = map(lambda x: (int)(x, 10), s.replace('.',':').split(':'))
r = d[0] * 1000 * 60 * 60
@zooxyt
zooxyt / setup.md
Last active May 16, 2017 07:40
Smart Proxy Installation Instructions

Smart Proxy Installation Instructions

Overview

We introduce a configuration to auto-proxy your connections to the internet and provide every instructions to guide you.

Requirements

  • VPS service
  • Router which runs OpenWrt
@zooxyt
zooxyt / miomio.py
Last active May 6, 2017 06:50
miomiotv Download
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import socket
import os
import urllib
import urllib2
import re
@zooxyt
zooxyt / start_steam_on_debian_9.sh
Created April 14, 2017 06:23
Start Steam on Debian 9
rm /home/USER/.steam/steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgpg-error.so.0
ln -s /lib/i386-linux-gnu/libgpg-error.so.0 /home/USER/.steam/steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgpg-error.so.0
// Notebook API
// Copyright(c) 2016 Cheryl Natsu
// Demo of a simple Notebook REST API
//
// Add a new note:
// curl -H "Content-Type: application/json" -X POST -d '{"name":"test","content":"Hello World"}' http://localhost:3000/AddNewNote
//
// Get all notes:
// curl -i http://localhost:3000/GetAllNotes
const mongoose = require('mongoose');
const express = require('express');
var bodyParser = require('body-parser');
const app = express();
var db = mongoose.connect('mongodb://localhost/webapi');
var Schema = mongoose.Schema;
app.use(bodyParser());
var messageSchema = new Schema({
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
.row:after {
content: ' ';
display: table;
clear: both;