Skip to content

Instantly share code, notes, and snippets.

@ttscoff
ttscoff / rtftomarkdown.rb
Created October 9, 2012 21:05
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References
@rhoit
rhoit / tkinter py2→py3
Last active December 18, 2015 20:39
tkinter py2→py3
py2 → py3
Tkinter → tkinter
tkMessageBox → tkinter.messagebox
tkColorChooser → tkinter.colorchooser
tkFileDialog → tkinter.filedialog
tkCommonDialog → tkinter.commondialog
tkSimpleDialog → tkinter.simpledialog
tkFont → tkinter.font
Tkdnd → tkinter.dnd
ScrolledText → tkinter.scrolledtext
@lastguest
lastguest / access_property.php
Last active January 24, 2024 09:18
PHP - Read/Write public/protected/private object property
<?php
// Access a property with no restrictions
function stole($object,$property){
$dict = (array)$object;
$class = get_class($object);
return isset($dict[$property])?
$dict[$property]:(isset($dict["\0*\0$property"])?
$dict["\0*\0$property"]:(isset($dict["\0$class\0$property"])?
$dict["\0$class\0$property"]:null));
15:03 < openlad1> | nube: how about live music after BSOD
15:03 < openlad1> | BSOD revisited
15:03 < openlad1> | :P
15:03 < nube> | openlad1: don't keep many program! in one
15:04 < nube> | lets beer drinking be beer drinking
15:04 < nube> | *let
15:04 < nube> | Music and stuff might add up cost! :/
15:05 < nube> | running around with no job openlad1
15:05 < nube> | people are student here!
15:06 < Avasz> | yess
@Avasz
Avasz / tmux.conf
Last active August 29, 2015 14:15
#Start index from 1 set -g base-index 1
set -g base-index 1
#Unbind ctrl+b and bind it to Alt+a
unbind C-b
set -g prefix M-a
bind M-a send-prefix
#Unbind % and bind | for vertical split and - for horizontal split
unbind %
bind | split-window -h
@joepie91
joepie91 / promises-reading-list.md
Last active June 25, 2023 09:12
Promises (Bluebird) reading list

Promises reading list

This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.

This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.

I'm available for tutoring and code review :)

You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).

@samundra
samundra / youtubeplayer.sh
Last active October 5, 2017 10:52
Borderless youtube player
#!/bin/bash
# Play and download the youtube video simultaneously
# Author: Samunddra
# Update Date: 2016-12-14 16:29:14 PM
#
# Use `screen` to play it in the background, fork screen process and exit, enjoy
#
# DEPENDENCIES
# - sudo apt install -y jq mplayer youtube-dl
#