This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = "put in the required sentence" | |
# reverse splice the sentence split by space, then join with space | |
" ".join(a.split(" ")[::-1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ~ -regex .*~$ -exec rm '{}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key "\C-h" 'delete-backward-char) | |
; bind original binding of help-command to a new shortcut, JIC | |
(global-set-key "\M-?" 'help-command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LICENCE: GPLv3 | |
# download all the startdict dictionaries into proper directory on linux | |
# requirements: | |
# 1) lxml library for python | |
# 2) wget program on linux | |
# 3) /usr/share/stardict/dic folder must exist | |
# currently this works on linux only, but is a good starting point | |
# i am only interested in the `url`, and any other stardict dictionaries are of no interest to me | |
# there is no error handling what so ever, it's a quick and dirty solution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# LICENCE: GPLv3 | |
# temp files '.*~' from given directories or starting at home directory | |
# usage: rm_temp.py <arg1> <arg2> ... <argn> | |
# ouputs: log of which directory it is working in | |
import os | |
import sys | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(column-number-mode t) ; included with emacs from v22 or something | |
;; enable lines on the side of buffer | |
(require 'linum) ; included with emacs from v22 or something | |
(linum-mode t) | |
;; I want this feature available in all buffers. Just a convenience | |
(global-linux-mode t) | |
;; have a padding of one line between line numbers and the text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# works only on ubuntu, and probably with gnome desktop installed, it is similar to | |
# mac's `open` command. | |
# usage: op notes.txt # opens the txt file with it's default app | |
# usage: op . # open current directory in file explorer, default nautilus mostly | |
# | |
# Basically, this pushes the output from the opened app to not show up on terminal | |
function op { | |
eval gnome-open \"$@\" &> /dev/null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'irb/completion' | |
require 'pp' | |
IRB.conf[:AUTO_INDENT]=true | |
if defined?(Rails) && !Rails.env.nil? | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
# ~.autotest | |
# require 'autotest_notification' | |
# SPEAKING = false | |
# DOOM_EDITION = false | |
# BUUF = false | |
# PENDING = false | |
# STICKY = false | |
# SUCCESS_SOUND = '' | |
# FAILURE_SOUND = '' |
OlderNewer