Skip to content

Instantly share code, notes, and snippets.

View imtoanle's full-sized avatar

Toan Le imtoanle

  • AITBase
  • Nha Trang
View GitHub Profile
enabled_layouts fat:bias=50;full_size=1;mirrored=false
map ctrl+c copy_and_clear_or_interrupt
map ctrl+v paste_from_clipboard
map ctrl+left previous_tab
map ctrl+right next_tab
map ctrl+w close_window
map ctrl+t new_tab
map ctrl+f launch --type=overlay --stdin-source=@screen_scrollback /usr/bin/fzf --no-sort --no-mouse --exact -i
map ctrl+k clear_terminal reset active
@imtoanle
imtoanle / autosub.py
Last active November 21, 2019 12:32
Autosub reject exits file
# command to run autosub nohup
# nohup sh -c 'find /srv/dev-disk-by-id-ata-ST6000VN0033-2EE110_ZAD7TTQ0-part1/Downloads/Torrents/CourseVideos/ -type f -iname "*.mp4" -exec autosub "{}" \;' 2>&1&
#!/usr/bin/python
import argparse
import audioop
from googleapiclient.discovery import build
import json
import math
import multiprocessing
@imtoanle
imtoanle / ruby_interview_question
Created April 23, 2015 08:46
Ruby Interview Question
## Begin!
Senior programmers won't have a problem with these, while junior programmers will usually give only half-answers.
#### What is a class?
A text-book answer: classes are a blue-print for constructing computer models for real or virtual objects... boring.
In reality: classes hold **data**, have **methods** that interact with that data, and are used to **instantiate objects**.
// 1: create js script for mongoshell, file export_institutions.js
//print header csv file
print("provider_code,name,website,postal_address,phone_number,location_ids")
db.institutions.find().forEach(function(institution){
//map location_id
location_ids = "";
if (typeof institution.locations != 'undefined') {
institution.locations.forEach(function(location){