curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
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 'spreadsheet' | |
Spreadsheet.client_encoding = 'UTF-8' | |
test_data = {:foo => 'a/a', :bar => 'normal'} | |
book = Spreadsheet::Workbook.new | |
sheet = book.create_worksheet :name => "#{test_data[:foo]}" | |
sheet = book.create_worksheet :name => "#{test_data[:bar]}" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
.my.select { | |
width: 120px; | |
font-size: 12px; | |
background-color: #ddd; | |
cursor: pointer; |
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
class Calculator | |
def calc(raw) | |
return 0 if raw.empty? | |
arith_calc(sanitize(raw)) | |
end | |
protected | |
def sanitize(raw='') | |
raw.scan(/[0-9]|\+|\-|\*|\/|\(|\)|sqrt/).join. | |
split(/(\+)|(\-)|(\*)|(\/)|(\()|(\))|(sqrt)/).reject(&:empty?) |
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
# Change Java Runtime: | |
sudo update-alternatives --config java | |
# Delete Open-JDK | |
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
# Change fonts - remove hinting: | |
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
# Change RubyMine AntiAliasing first: |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- | |
Documented at | |
http://linux.die.net/man/5/fonts-conf | |
To check font mapping run the command at terminal | |
$ fc-match 'helvetica Neue' |
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 bash | |
find ./* -newermt 2015-10-05 | grep xml | xargs grep '<track>' | wc -l |
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 bash | |
rsync -rv --include '*/' --include '*.js' --exclude '*' --prune-empty-dirs Source/ Target/ |
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 'minitest/autorun' | |
class MonkeyKingElector | |
def elect(n, m) | |
(1..n).to_a.tap { |x| x.delete_at(m % x.size - 1) while x.size > 1 }[0] | |
end | |
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
find . -type f -name '*.css.scss' -exec bash -c 'mv $1 $(dirname "$1")/$(basename "$1" .css.scss).scss' _ {} \; |
OlderNewer