This file contains hidden or 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
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:orientation="vertical" > | |
| <TextView android:id="@+id/text" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:text="Hello, I am a TextView" /> | |
| <Button android:id="@+id/button" | |
| android:layout_width="wrap_content" |
This file contains hidden or 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
| gedit & | |
| PID=$! | |
| while :; do | |
| sleep 3 | |
| ps -up $PID | |
| echo "... get info about"$PID | |
| done |
This file contains hidden or 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/bash | |
| #wget https://download.mozilla.org/?product=firefox-33.0.2-SSL&os=linux64&lang=en-US | |
| cd ~/Downloads/ | |
| cp firefox-33.0.2.tar.bz2 /opt/ | |
| cd /opt/ | |
| tar -xvf firefox-33.0.2.tar.bz2 | |
| rm firefox-33.0.2.tar.bz2 |
This file contains hidden or 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 'yahoo-finance' | |
| stocks = ["PETR3.SA"] | |
| yahoo_client = YahooFinance::Client.new | |
| data = yahoo_client.quotes( stocks, [:close]) | |
| File.open("quotes.csv", "w+") do |file| | |
| stocks.size.times do |x| | |
| file.puts "\"#{stocks[x]}\",#{data[x].close}" |
This file contains hidden or 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
| vimdiff <(grep 'include Active$' -R . | awk '{ print $1 }' | cut -f1 -d: | cut -f2 -d/ | sort -u ) <(ls | sort -u) |
This file contains hidden or 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
| :args *.rb | argdo execute "normal gg=G" | update | |
| # http://stackoverflow.com/questions/3218528/indenting-in-vim-with-all-the-files-in-folder |
This file contains hidden or 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/bash | |
| confirm () { | |
| # call with a prompt string or use a default | |
| read -r -p "${1:-Are you sure? [y/N]} " response | |
| case $response in | |
| [yY][eE][sS]|[yY]) | |
| true | |
| ;; | |
| *) | |
| false ;; |
This file contains hidden or 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
| args **/**.js.erb | argdo execute '%s/<%= I18n.t \(.*\) %>/I18n.t(\1)/g' | update |
This file contains hidden or 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/bash | |
| awk 'NR==FNR{a[$1];next}!($1 in a)' <(ls | sed 's/_spec.rb//g' | sort) <(ls ../../app/models/ | sed 's/.rb\|.bak//g' | uniq | sort) | awk '{ print "- [ ]",$1 }' | xclip -sel clip |
This file contains hidden or 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
| for i in $(ls -d pfcm*); do echo -n "$i "; cat $i/discover.arff | grep "class " | cut -f2 -d{ | awk '{n=split($0,a,","); print n}'; done >> clusters_count.txt |
OlderNewer