fredag 27 mars 2015
onsdag 25 mars 2015
Debian Wheezy - Spotify
Spotify for Linux
This is a preview build of Spotify for Linux. As a preview release this version is still unsupported, but we're running it ourselves and will try to make sure it keeps pace with its Mac and Windows siblings.So how do you get it? We've packaged it for Debian Squeeze/Ubuntu.
Debian
# 1. Add this line to your list of repositories by # editing your /etc/apt/sources.list deb http://repository.spotify.com stable non-free # 2. If you want to verify the downloaded packages, # you will need to add our public key sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59 # 3. Run apt-get update sudo apt-get update # 4. Install spotify! sudo apt-get install spotify-client
#--------------------------------------------------------------------------------------------As of this writing the current release of Spotify for Linux is built for Debian Squeeze/Ubuntu. That package is dependant on the libssl0.9.8 while Debian Wheezy has the newer libssl1.0.0 installed. The easy way to fix this would be to install libssl0.9.8 system wide from the Squeeze repository, however I don't like the idea of installing an older package system wide just because Spotify is slow on updating their package for Wheezy. This guide will show you how I worked around this issue, adding libssl0.9.8 only for spotify.
First try to install Spotify using the guide on the Spotify homepage
When running the command:
sudo apt-get install spotify-client
apt-get download spotify-client
sudo apt-get install libqt4-dbus libqt4-network libnspr4-0d sudo dpkg --ignore-depends=libssl0.9.8 -i spotify-client_0.9.1.55.gbdd3b79.203-1_amd64.deb
Open the file /var/lib/dpkg/status and search for spotify-client, under spotify-client find the depends: line and remove the libssl0.9.8 dependency.
So now we need to download libssl0.9.8 from the Debian package website
Since I don't want to install the package system wide I only want to extract the files from the package and move them to a suitable path using this command:
dpkg -x libssl0.9.8_0.9.8o-4squeeze14_amd64.deb /tmp/libssl0.9.8 sudo mv /tmp/libssl0.9.8/usr/lib /usr/share/spotify/libssl0.9.8
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/spotify/libssl0.9.8 spotify
1 2 3 4 | #!/bin/bash # Add libssl0.9.8 path LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/spotify/libssl0.9.8 spotify $1 |
Remember to add execution permissions to the spotify-starter script
sudo chmod +x spotify-starter
Exec=spotify-starter %U TryExec=spotify-starter
linux - package fresh-install
Version: 6.0~6
Architecture: all
Maintainer: Rafael Senties Martinelli <rsm@imap.cc>
Depends: gksu, aptitude, python2.7, python-psutil, python-numpy, python-vte, exo-utils, apt, gir1.2-vte-2.90, libgtk-3-0
Installed-Size: 463
Section: utils
Priority: optional
Homepage: rsm.imap.cc/software/fresh-install.html
Description: Create a custom backup of the system and be able to make an easy set up in other computers.
This program has been created to make a good system configuration backup and to be able to set it in a new system fast and easy. It is very useful for a computers fresh install, because with it you can select all the software, files and folders that you would like to install and replace them in a fresh install by just pushing a button.
.
It is more effective than making a copy of the whole system and replacing it. Replacing the whole system doesn't work good if you change your computer. It may also bring bugs, and undesired files to the new system.
.
With this program you have full control of your backup.
4shared download link
Bye! Bye! MINT... Welcome Debian---- Hello World!
måndag 23 mars 2015
linux - packages commands
#---------------------------------------------------------------------------------------------
The original script will miss out packages with long names
such as
"openoffice.org-hyphenation-en-us". A better way to
get the complete
list of manually-installed packages using only aptitude is:
#---------------------------------------------------------------------------------------------
#Long version of list installed not automatic
aptitude search "?installed ?not(?automatic)" ;--display-format "%p"
" > apitiude-long-installed-not-automatic.txt
#Short version of list installed not automatic
aptitude search "?installed ?not(?automatic)" --display-format "%p" > apitiude-installed-not-automatic.txt
#Output wajing commands to textfile
wajig list-commands > wajig-commands.txt
#---------------------------------------------------------------------------------------------
This following line dont work
sudo aptitude markauto $(apt-cache showsrc PACKAGE | grep Build-Depends | perl -p -e 's/(?:[\[(].+?[\])]|Build-Depends:|,|\|)//g')
apt-get --print-uris --yes install vlc | grep ^\’ | cut -d\’ -f2>>offline.txt
aptitude keep-all && aptitude update && aptitude upgrade
måndag 16 mars 2015
Miobil - APN-inställningar Massa Olika Operatörer Sverige
För att du ska kunna använda datatrafik över mobilnätet (2G, 3G och 4G) samt att skicka MMS behöver du lägga till APN inställningar. Här kommer APN-inställningar för olika Svenska operatörer som man kan behöva ställa in manuellt, t.ex. om man importerar telefonen. Mer information finns på Swedroid's forum.
söndag 15 mars 2015
Linux - Youtube2mp3 - Front - Kde ........... .desktop open bash sh file Mint kde 17.1
http://pastebin.com/Him2rAFf http://pastebin.com/QgD7tuTP http://pastebin.com/DhCFPQGe
Linux - Youtube-dl error - new version fix the problem WARNING: Automatic signature extraction failed: Traceback (most recent call last):
WARNING: Warning: Falling back to static signature algorithm
WARNING: Automatic signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 957, in _decrypt_signature
video_id, player_url, len(s)
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 331, in _extract_signature_function
player_type = id_m.group('ext')
AttributeError: 'NoneType' object has no attribute 'group'
WARNING: Warning: Falling back to static signature algorithm
ERROR: unable to download video data: HTTP Error 403: Forbidden
apt-get
installed version 2014.02.17
. Your solution fixed everything!fredag 13 mars 2015
Linux - Build deb ffrom source and unpack deb files
sudo gedit /etc/apt/sources.list
deb http://packages.linuxmint.com/ maya main upstream import universe
deb-src http://packages.linuxmint.com/ maya main upstream import universe #Added by software-properties
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
deb-src http://archive.canonical.com/ubuntu/ precise partner
deb http://packages.medibuntu.org/ precise free non-free
deb http://archive.getdeb.net/ubuntu precise-getdeb apps
deb http://archive.getdeb.net/ubuntu precise-getdeb games
deb http://liveusb.info/multisystem/depot all main
sudo apt-get install checkinstall autoconf
#build pidgin
sudo apt-get build-dep pidgin
sudo apt-get -b source pidgin
sudo autoconf && ./configure && make && make install && checkinstall
#build ruby2.0
sudo apt-get build-dep ruby2.0
sudo apt-get -b source ruby2.0
sudo autoconf && ./configure && make && make install && checkinstall
#build gem
sudo apt-get build-dep gem
sudo apt-get -b source gem
sudo autoconf && ./configure && make && make install && checkinstall
sudo dpkg --unpack program.deb
sudo tar -zxvf data.tar.gz
dpkg -x package.deb ./deb/
Linux - Building .deb Packages from Source in Ubuntu (or Debian)
Written by Chris Olstrom in Guides
At least two solutions exist, each suited to a different purpose.
Linux - Own pastebin server Hastebin-server
i get back to you all if it works!
http://pastebin.com/D0cEzheV
have build and works great but where the fuck is all post
*.hs cant find anybody know email me hynt@speed-mailer.com
this is my config
http://www.4shared.com/archive/oejS_xVUce/haste-servertar.html
tisdag 10 mars 2015
Linux - Bash Random number generator
MY_RANDOM="$RANDOM % 60) + 1]"
echo $MY_RANDOM
Linux - Bash Litet Backup Script jag jobbat på under natten
ett litet script som kopierar en kopia av /etc/apt/ tillbaka till /etc/apt/
eller skapar en kopia av /etc/apt/ antligen som .tgz eller som i befitligt skick
perfekt då man ska installera om datorn och vill ha sina gammla ppa tillbaka
spara som .install.sh
#!/bin/bash
#!/bin/sh
clear
MAL="/etc/apt/"
KALLA="$(realpath $(dirname $0))"
RANDOM=`date '+%s'`
MY_RANDOM="$RANDOM % 60) + 1]"
start_help(){
clear
echo "Script som återställer backup ifrån $MAL"
echo "$KALLA tillbaka till $MAL"
echo "tänk på att $MAL kommer raderas!!!!!"
echo "Skoja! klart jag gjort en backup på nuvarande varje gång du kör scriptet
echo "om du vill skapa en backup så går det som packad version eller som opackad version"
echo "gjort en kopia av $MAL till osynlig fil"
echo "som du hittar i $KALLA skriv ls -a för visa alla filer..."
echo ""
echo "sudo sh .install.sh replace Erstätter $MAL med filerna ifrån $KALLA"
echo "sudo sh .install.sh backup packar ner $MAL till $KALLA i osynlif tar fil ."
echo "sudo sh .install.sh all Kör alla alternativen..."
echo "sudo sh .instal.sh backup_to_here Tarbort $KALLA och ersätter med $MAL <-- are YOU SURE!!!"
echo "sudo sh .install.sh felsokning Visar lite information som kan användas vid felsöknings syfte"
echo ""
echo"(c) hynt@speed-mailer.com free to use and modify"
return $TRUE
}
all(){
clear
backup_MAL
replace_MAL
felsokning
return $TRUE
}
felsokning(){
echo felsökning!
echo $KALLA
echo $MAL
echo $MY_RANDOM
echo $MY_DATE
return $TRUE
}
backup_MAL(){
sudo tar cfvz .$MY_RANDOM.tgz --exclude="install.sh" apt.conf.d preferences.d sources.list.d trusted.gpg.d *.*
return $TRUE
}
replace_MAL(){
cd $MAL && rm -R *.*
cd $KALLA && cp *.* $MAL
cd $KALLA && cp -r *.d $MAL
cd $MAL && rm install.sh && rm *.tgz
return $TRUE
}
backup_to_here(){
cd $KALLA && cp .install.sh $MAL
cd $KALLA && rm -r *.* && rm -r *.d && rm *.*
cd $MAL && cp *.* $KALLA
cd $MAL && cp -avr *.d $KALLA
echo "Grattis! nu är $MAL alla filer i $KALLA men dom osynliga .filerna ifrån tidigare är kvar"
return $TRUE
}
# -Case start
# if no command line arg given
# set val to Unknown
if [ -z $1 ]
then
val="*** Unknown ***"
elif [ -n $1 ]
then
# otherwise make first arg as val
val=$1
fi
# use case statement to make decision for rental
case $val in
"replace") replace_MAL ;;
"backup_to_tar") backup_MAL ;;
"all") all ;;
"backup_to_here") backup_to_here ;;
"help") start_help ;;
"felsokning") felsokning ;;
*) echo "Sorry, I can not get a $val for you use install.sh help!";;
esac
# Case stop
Linux - Bash Random number generator
Linux - Youtube 2 Mp3 i terminalen
linux - undo apt-get-build-dep
Men tack vare tvst och Wesley Schwengle, kan du ångra "apt-get build-dep" genom att köra följande kommando (först installera aptitude använder "sudo apt-get install aptitude"):
sudo aptitude markauto $(apt-cache showsrc PACKAGE_NAME | sed -e '/Build-Depends/!d;s/Build-Depends: \|,\|([^)]*),*\|\[[^]]*\]//g')
sudo apt-get autoremove
Ångra apt-get build-dep (Ta Build beroenden)
Författare: Andrew | Datum: söndag, oktober 24, 2010
Tweet
När du vill kompilera något från källa i Ubuntu / Debian, det enklaste sättet att installera beroenden som krävs för att sammanställa det är att köra (sudo) "apt-get build-dep PACKAGE_NAME". Men det finns ingen inbyggd kommando för att ta bort dessa beroenden (som apt-get remove-dep).
Men tack vare tvst och Wesley Schwengle, kan du ångra "apt-get build-dep" genom att köra följande kommando (först installera aptitude använder "sudo apt-get install aptitude"):
sudo aptitude markauto $ (apt-cache showsrc PACKAGE_NAME | sed -e '/ Build-Depends / d; s / Build-Depends: \ |, \ | ([^)] *), * \ | \ [[^] ] * \] // g ')
sudo apt-get autoremove
I ovanstående kommando, ersätt "PACKAGE_NAME" med namnet på det paket du tidigare har sprang "apt-get build-dep" för. Running "sudo apt-get autoremove" bör då ta bort alla paketen som är byggberoenden för PACKAGE_NAME och därmed, installerades av "apt-get build-dep" kommandot.
Uppdatera: det finns problem med detta kommando och några paket. Till exempel försöker ångra "apt-get build-dep" för vin leder märkning ett stort antal paket som automatiskt installerade. Om det händer, kör "sudo apt-get install PAKET-märkt-AS-automatiskt installerade" markerar paketen som installeras så att de inte kommer att tas bort, ångra kommandot ovan. Så använd detta med omsorg och endast om du vet vad du gör!
I fall du undrar vad kommandot ovan gör:
lämplighets auto - Markera paket har konstaterats installeras automatiskt (så om någon är beroende av dem, kommer de att tas bort)
apt-cache showsrc - Visa källposter
sed ....: - söker efter "Bygg-Depends:" i källdokument och tar bort onödiga grejer från paketnamnen (extra tecken som parenteser osv avlägsnas från utgången).
För att använda den som ett alias i din ~ / .bashrc-fil, se wilo108 kommentar nedan.
söndag 8 mars 2015
Linux - Bash Gem local install *.gem and more
lördag 7 mars 2015
linux - gem2deb from gem list
Linux bash The case statement is good alternative to multilevel if-then-else-fi statement. It enable you to match several values against one variable. It is easier to read and write.
The case statement is good alternative to multilevel if-then-else-fi statement. It enable you to match several values against one variable. It is easier to read and write.
Syntax
The syntax is as follows:
case $variable-name in pattern1) command1 ... .... commandN ;; pattern2) command1 ... .... commandN ;; patternN) command1 ... .... commandN ;; *) esac
case $variable-name in pattern1|pattern2|pattern3) command1 ... .... commandN ;; pattern4|pattern5|pattern6) command1 ... .... commandN ;; pattern7|pattern8|patternN) command1 ... .... commandN ;; *) esac
- The case statement allows you to easily check pattern (conditions) and then process a command-line if that condition evaluates to true.
- In other words the $variable-name is compared against the patterns until a match is found.
- *) acts as default and it is executed if no match is found.
- The pattern can include wildcards.
- You must include ;; at the end of each commandN. The shell executes all the statements up to the two semicolons that are next to each other.
- The esac is always required to indicate end of case statement.
Example
Create a shell script called rental.sh:
#!/bin/bash # if no command line arg given # set rental to Unknown rental="*** Unknown vehicle ***" # otherwise make first arg as a rental rental= # use case statement to make decision for rental $rental "car" "For $rental rental is Rs.20 per k/m." "van" "For $rental rental is Rs.10 per k/m." "jeep" "For $rental rental is Rs.5 per k/m." "bicycle" "For $rental rental 20 paisa per k/m." "enfield" "For $rental rental Rs.3 per k/m." "thunderbird" "For $rental rental Rs.5 per k/m." "Sorry, I can not get a $rental rental for you!"
Save and close the file. Run it as follows:
chmod +x rental.sh .rental.sh .rental.sh jeep .rental.sh enfield .rental.sh bike
Sample outputs:
Sorry, I can not get a *** Unknown vehicle *** rental for you! For jeep rental is Rs.5 per k/m. For enfield rental Rs.3 per k/m. Sorry, I can not get a bike rental for you!
The case statement first checks $rental against each option for a match. If it matches "car", the echo command will display rental for car. If it matches "van", the echo command will display rental for van and so on. If it matches nothing i.e. * (default option), an appropriate warning message is printed.
Using Multiple Patterns
#!/bin/bash =$ + Mon "Full backup" TueWedThuFri "Partial backup" SatSun "No backup"
The following shell script demonstrate the concept of command line parameters processing using the case statement (casecmdargs.sh):
#!/bin/bash = # option = # filename # test -e and -E command line args matching -E "Editing $2 file..." # make sure filename is passed else an error displayed $FILE "File name missing"; ; $FILE -C "Displaying $2 file..." $FILE "File name missing"; ; $FILE -D "Today is $(date)" "Bad argument!" "Usage: $0 -ecd filename" " -e file : Edit file." " -c file : Display file." " -d : Display current date and time."
Run it as follows:
chmod +x casecmdargs.sh .casecmdargs.sh .casecmdargs.sh tmp .casecmdargs.sh tmp .casecmdargs.sh .casecmdargs.sh
Creating a backup script
Create a backup script called allinonebackup.sh:
#!/bin/bash # A shell script to backup mysql, webserver and files to tape = sql "Running mysql backup using mysqldump tool..." "Running backup using rsync tool..." "Running tape backup using tar tool..." "Backup shell script utility" "Usage: $0 {sql|sync|tar}" " sql : Run mySQL backup utility." " sync : Run web server backup utility." " tar : Run tape backup utility."
Save and close the file. Run it as follows:
chmod +x allinonebackup.sh # run sql backup .allinonebackup.sh sql # Dump file system using tape device .allinonebackup.sh # however, the following will fail as patterns are case sensitive # you must use command line argument tar and not TAR, Tar, TaR etc. .allinonebackup.sh TAR
Linux Bash - Tar all folder & Files in users /home/user/
cd /home/user/ tar -cvpjf backup`date +%m%d%y`.tar.bz2 --exclude=~/backup`date +%m%d%y`.tar.bz2 ~/
Linux bash skapa fil.sh -command
utan att behöva köra .sh filen "hela" utan bara ett kommando
h.sh är med i alla mina nyare filer pga låt oss titta på mina filer eller kör på ovanstående..
fredag 6 mars 2015
Linux - Terminal - Vad är programet beroende av
torsdag 5 mars 2015
Linux - Bash - empty trash in terminal if yes
Linux - bash add ppa, yes or no to run command, show size of folder, mfl
onsdag 4 mars 2015
Linux - normal user Cant become root
Linux Bash - add normal user to root group - usermod -a -G root username
To add a user to the group root you should run (as root):
usermod -a -G root username
Linux - Bash - get size of folders in bash (rekommended)
version="1.0.0"
# Show size of folder used to store *.deb
# i use version in this exemple if no .sh file is used
clear && version="1.0.0" && echo Before copy to root && du -csh /root/deb /root/installos /var/cache/apt/archives && echo hanterar deb filer && echo installos $version && echo hynt@speed-mailer.com
# output in terminal
måndag 2 mars 2015
Linux - Bash- use sed and more - downloads dependency for gem file enter programs name in bash script
linux - bash remove everything in file betwen char ( and char )
- clear
- echo "Before:"
- echo "Gem actionmailer-4.2.0"
- echo "actionpack (= 4.2.0)"
- echo "actionview (= 4.2.0)"
- echo "activejob (= 4.2.0)"
- echo "mail (>= 2.5.4, ~> 2.5)"
- echo "rails-dom-testing (>= 1.0.5, ~> 1.0)"
- gem dependency > dependsgem.txt
- echo '(F/.M/d h)' | sed 's/(.*)//' dependsgem.txt > dependsgem1.txt
- sed -e '/^[A-Z]/d' dependsgem1.txt > dependsgem2.txt
- sed -e 's/^[ \t]*//' dependsgem2.txt > dependsgem3.txt
- sed '/^$/d' dependsgem3.txt > dependsgem4.txt
- sudo perl -lane 'print "@F" if @F = grep !$seen{$_}++, @F' < dependsgem4.txt > dependsgem5.txt
- ls -1 | awk 'ORS=" "' dependsgem5.txt > dependsgem6.txt
- fold -s dependsgem6.txt > dependsgem7.txt
- while read LINE;do LARGE="sudo gem install $LINE";echo $LARGE>>dependsgem.sh;done<dependsgem7.txt
- clear
- echo "Make so .sh can run"
- sudo chmod u+x dependsgem.sh
- echo "Clean - delete *.txt files"
- sudo rm dependsgem1.txt && rm dependsgem2.txt && rm dependsgem3.txt && rm dependsgem4.txt
- sudo rm dependsgem5.txt && rm dependsgem6.txt && dependsgem7.txt
- echo "dependsgem.sh created"
- echo "sudo ./dependsgem.sh to run"
- echo "After:"
- echo "sudo gem install rake hoe actionpack actionview activejob mail rails-dom-testing activemodel"
- echo "sudo gem install activesupport rack rack-test rails-html-sanitizer builder erubis globalid arel"
- echo "sudo gem install i18n json minitest thread_safe tzinfo launchy rspec rspec-its ansi detroit qed"
- echo "sudo gem install ae ergo indexer lemon mast bundler thor rdoc cabin bcat childprocess cucumber"
- echo "sudo gem install cucumber-pro fuubar kramdown rspec-expectations rubocop coderay haml nokogiri"
Linux - "bash" perl remove dublicate word in file in one line - alias
söndag 1 mars 2015
Linux - trying to login on firefox addon Pastebin linux mint 14 firefox 36.0
Version | Download | API Version | Developer |
---|---|---|---|
3.0 | DOWNLOAD | 3.0 | Prafulla Kiran |
- #!/bin/bash
- clear
- -(-Vem Är du-)------------------------------------------
- function findUser() {
- thisPID=$$
- origUser=$(whoami)
- thisUser=$origUser
- while ( "$thisUser" = "$origUser" )
- do
- ARR=($(ps h -p$thisPID -ouser,ppid;))
- thisUser="${ARR(0)}"
- myPPid="${ARR(1)}"
- thisPID=$myPPid
- done
- getent passwd "$thisUser" | cut -d: -f1
- }
- user=$(findUser)
- echo "logged in: $user"
- -----(-Vem Är du-)-
- # Start of adding PPA
- # Lägger till ppa för få ruby mysql att fungera
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- the_ppa01="deb http://host/debian distribution system develompment utilities"
- the_ppa02="deb-src http://host/debian distribution system develompment utilities"
- the_ppa03="deb http://http.us.debian.org/debian stable main contrib non-free"
- the_ppa04="deb-src http://http.us.debian.org/debian stable main"
- if ! grep -q "$the_ppa01" /etc/apt/sources.list /etc/apt/sources.list.d/-; then
- # commands to add the ppa ...
- echo "ppa not found, adding:"
- sudo sh -c "echo $the_ppa01 >> /etc/apt/sources.list"
- fi
- if ! grep -q "$the_ppa02" /etc/apt/sources.list /etc/apt/sources.list.d/-; then
- # commands to add the ppa ...
- echo "ppa not found, adding:"
- sudo sh -c "echo $the_ppa02 >> /etc/apt/sources.list"
- fi
- if ! grep -q "$the_ppa03" /etc/apt/sources.list /etc/apt/sources.list.d/-; then
- # commands to add the ppa ...
- echo "ppa not found, adding:"
- sudo sh -c "echo $the_ppa03 >> /etc/apt/sources.list"
- fi
- if ! grep -q "$the_ppa04" /etc/apt/sources.list /etc/apt/sources.list.d/-; then
- # commands to add the ppa ...
- echo "ppa not found, adding:"
- sudo sh -c "echo $the_ppa04 >> /etc/apt/sources.list"
- fi
- #(Update)---------------
- sudo apt-get update
- #End of adding PPA
- #==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # RVM INSTALL (exempel 3) - Sucess! v1.26.10 latest
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- echo "installing ruby stable"
- curl -sSL https://get.rvm.io | bash -s stable --ruby
- #
- # If you want to maybe jump back to your system
- # installed Ruby which might be Ruby 1.8.6
- # you can run the following command:
- # > rvm use system
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #==-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=
- # rvm is found here! (If you Used Exempel 3)
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # /usr/local/rvm/
- #
- # Pastebin and the other is found here!
- #
- # /usr/local/bin/
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # - ERROR!---NOW!-ALL-SHIT!-Is-Installed--
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # rvm installed but lvm command dont work! - Error
- #
- # rvm: kommandot hittades inte
- #
- # > /usr/local/rvm/bin/rvm <-- this the file, ok!
- #
- #Dont paste the >
- #=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #- Lets! make a alias by hand!
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==
- #
- # 1. make a file in your home named
- # .bash_aliases
- #
- # 2. add the line:
- # alias rvm="/usr/local/rvm/bin/rvm"
- #
- # 3. Reboot or refresh .bash_aliases
- # . /home/user/.bash_aliases
- # dit it work?
- # Najs!..
- #
- # 4. not working, run in your terminal:
- # sudo reboot
- #
- # 5. make it to a alias to (user is your username!)
- # add the line:
- # alias updatealias=". ~/.bash_aliases"
- #
- #----------------------------------------------------------------------------
- # (-WHY NOT!-)-Lets use a bash script! -
- #----------------------------------------------------------------------------
- # To much work or to less work! We dont have t
- # write a little program that does write a the new
- # alias if it not alredy exist to the file .bash_aliases!
- #
- touch /home/$user/.bash_aliases
- printf "alias pastebin='/usr/local/bin/pastebin -l bash -e 10M -f '\n" >> ~/.bash_aliases
- printf "alias hpastebin='/usr/local/bin/pastebin -l bash -f '\n" >> ~/.bash_aliases
- printf "alias rvm='/usr/local/rvm/bin/rvm'\n" >> ~/.bash_aliases
- . ~/.bash_aliases
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #- Pastebin - - (exempel)
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #pastebin -f /home/username/Dokument/file.sh -l bash -e 10M
- #
- # remove -e 10M if you dont want your file to expire
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
- #-------------------------------------------------------------------------------
- #- better to install ruby 2.0 use not this (If you are smart READ @ end first.-
- #- use exempel 3 not this crap! ) <--- tHIS did not work 4 me-
- #-------------------------------------------------------------------------------
- #sudo apt-get -y update
- #sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
- #cd /tmp
- #wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz
- #tar -xvzf ruby-2.0.0-p481.tar.gz
- #cd ruby-2.0.0-p481/
- #./configure --prefix=/usr/local
- #make
- #sudo make install
- #---------------
- #- curl is needed -
- #------------------
- #bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #- Other way to install ruby that i found / BUT! use exemepel 3 i always do. (Exempel 2) -
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # :> sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- # \curl -sSL https://get.rvm.io | bash -s stable
- #
- # Dont paste the >
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- echo "hi $user"
- #some deb files
- apt-get install mysql-client mysql-server libmysql-ruby client-dev git curl automake libxml2-dev libxslt-dev autoconf openssl libreadline6 zlib1g subversion -y
- apt-get install libsqlite3-0 libsqlite3-dev sqlite3 libc6-dev ncurses-dev libtool bison build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev -y
- apt-get install debhelper fakeroot ruby-dev
- #Install RVM with Ruby and Ruby on Rails with all required libraries:
- echo "installing ruby stable"
- curl -sSL https://get.rvm.io | bash -s stable --ruby
- #installing rails
- echo "intalling rails"
- \curl -L https://get.rvm.io | bash -s stable --rails
- #activate auto deps 4 rvm
- echo "activate auto depends 4 rvm"
- sudo /usr/local/rvm/bin/rvm autolibs packages
- sudo /usr/local/rvm/bin/rvm autolibs homebrew
- #install head
- rvm install 2.0.0
- rvm | head -1
- rvm list known
- ruby -v
- rvm use --default 2.0.0
- rvm 2.0.0 do gem install mysql
- gem install rdoc-data; rdoc-data --install
- gem install curl bundler mustache rdiscount ronn rspec builder git github_api highline nokogiri rake rdoc jeweler pastebin hpricot
- gem install rake-debian-build buildrdeb pry-debundle pry codebutler coderay sinatra rubygems-update rails bundler
- gem install debsfromrepos cucumber rapec make-rubygem-debs fpm gem2deb ruby-debiandebianize json rest-client slop debstep DebianPackageDownloader hoe
- gem install deb-fog fog thor dpkg-deb debugher addressable robots debot capistrano capistrano-ext quick-debug cache_debugging rails sqlite3 adressable
- gem install albanpeignier-rake-debian-build ruby-deb ar deb_control debeasy libarchive ruby-filemagic deblank
- gem install rubygems-mygems rubygems_dump rubygems-localproxy rubygems-deep_fetch rubygems_snapshot rubygems-bundler tf bundler-unload executable-hooks
- gem install rubygems-code_finder faraday multi_json octokitbundler webmock octokit sawyer ctags-bundler mpapis-bundler assetbundler asset_bundler
- gem install onpack actionview activejob activemodel activesupport ammeter appraisal arel arr-pm aruba asciidoctor asset_timestamps_cache atomic
- gem install awesome_print backports bcat bluecloth permutation sdoc echoe bones bones-rcov rcov spoon hoe-debugging hoe-gemspec http-cookie
- gem install net-http-digest_auth cabin capistrano-stats capybara CFPropertyList childprocess clamp closure-compiler
- gem install code_statistics coffee-script coffee-script-source colorize contest coveralls crack creole curb delorean descendants_tracker diff-lcs
- gem install docile docker-api eco ejs em-http-request erubis eventmachine excon execjs fakefs ffi fission flexmock fog-atmos fog-aws fog-brightbox
- gem install fog-core fog-ecloud fog-json fog-profitbricks fog-radosgw fog-riakcs fog-sakuracloud fog-serverlove fog-softlayer
- gem install fog-storm_on_demand fog-terremark fog-vmfusion
- gem install fog-voxel fog-xml formatador gems gherkin github-markup globalid google-api-client gpg_status_parser guard-rspec haml hashie hike hoe-bundler hoe-doofus
- gem install hoe-gemspec2 hoe-git hoe-rubygems hoe-seattlerb hoe-travis http httparty httpclient i18n inflecto insist ipaddress kpeg kramdown launchy less
- gem install libnotify liquid loofah mail markaby maruku mechanize midiator mime-types minitest minitest-stub-const mocha multipart-post multi_test multi_xml
- gem install net-http-persistent ntlm-http webrobots bacon Platform benchmark-ips mini_portile racc rexical jwt method_source actionmailer
- gem install activerecord netrc net-scp net-ssh oauth2 open4 opennebula osrcry patron pry-doc rack rack-protection rack-test radius
- gem install rails-deprecated_sanitizer rails-dom-testing rails-html-sanitizer railties sprockets-rails rake-compiler ramaze rb-inotify rbovirt rbvmomi
- gem install redcarpet RedCloth ritual rr rspec-core rspec-expectations rspec-its rspec-mocks rspec-rails rspec-support
- gem install rubocop ruby-beautify rubyforge rubygems-tasks rubyzip safe_yaml sass session shindo shoulda simplecov spork sprockets sshkit stud
- gem install syntax test-unit therubyracer thoughtbot-shoulda thread_safe tilt turn typhoeus tzinfo uglifier unf unf_ext unidecoder unindent vcr webrat
- gem install wikicloth yajl-ruby yard yui-compressor ZenTest oauth_bundle neobundle auto_build ro-bundle matebundle
- gem install rubygems-sandbox make deb gemcutter rubygems-pwn rubygems-sing gem_plugin rubygems-source rubygems-update update_rubygems nokogiri
- gem install rubygems-bundler rubygems-crawler glaze-analyzer query-analyzer pg_query_analyzer
- gem install rake hoe actionpack actionview activejob mail rails-dom-testing activemodel
- gem install activesupport rack rack-test rails-html-sanitizer builder erubis globalid arel
- gem install i18n json minitest thread_safe tzinfo launchy rspec rspec-its ansi detroit qed
- gem install ae ergo indexer lemon mast bundler thor rdoc cabin bcat childprocess cucumber
- gem install cucumber-pro fuubar kramdown rspec-expectations rubocop coderay haml nokogiri
- gem install slim tilt yard yard-tomdoc asset_timestamps_cache thoughtbot-shoulda bacon
- gem install bacon-colored_output coveralls json_pure mime-types simplecov guard-rspec
- gem install guard-rubocop parser ruby_gntp addressable extlib multi_json appraisal fakefs
- gem install sqlite3 little-plugger loquacious rubytest mustache rdiscount ronn amq-protocol
- gem install rails parallel rspec-fire capistrano-stats mocha sshkit capistrano ffi
- gem install test-construct sinatra coffee-script-source execjs rest-client term-ansicolor
- gem install vcr webmock safe_yaml aruba capybara diff-lcs gherkin multi_test ramaze rubyzip
- gem install spork syntax test-unit webrat awesome_print unidecoder docile rspec-rails fog
- gem install slop capistrano-ext robots chronic hoe-bundler hoe-doofus hoe-gemspec2 hoe-git
- gem install hoe-rubygems hoe-travis rubyforge github-markup redcarpet archive-tar-minitar
- gem install cane excon pry shoulda unf allison notify delorean eventmachine open4 shindo
- gem install minitest-rg multipart-post CFPropertyList docker-api fission fog-atmos fog-aws
- gem install fog-brightbox fog-core fog-ecloud fog-json fog-profitbricks fog-radosgw
- gem install fog-riakcs fog-sakuracloud fog-serverlove fog-softlayer fog-storm_on_demand
- gem install fog-terremark fog-vmfusion fog-voxel fog-xml google-api-client ipaddress
- gem install opennebula rbovirt rbvmomi turn inflecto formatador minitest-stub-const net-scp
- gem install net-ssh osrcry http-form_data arr-pm backports clamp insist stud mechanize
- gem install ruby-progressbar ritual rr html-pipeline nokogiri-diff sanitize
- gem install descendants_tracker faraday hashie oauth2 autoparse retriable signet rbench
- gem install test_declarative code_statistics hoe-gemspec hoe-seattlerb travis-lint
- gem install domain_name multi_xml bluecloth git github_api highline permutation sdoc echoe
- gem install itextomml prawn ritex rouge stringex bones bones-rcov rcov spoon reap commonjs
- gem install rake-compiler rspec-spies vulcan codeclimate-test-reporter colorize
- gem install hoe-debugging fpm http-cookie net-http-digest_auth net-http-persistent
- gem install ntlm-http webrobots Platform introspection metaclass benchmark-ips nenv
- gem install shellany jwt sawyer ast cliver gauntlet racc simplecov-sublime-ruby-coverage
- gem install jeweler method_source latest_ruby brass rulebow bunny logification actionmailer
- gem install activerecord railties sprockets-rails rails-deprecated_sanitizer loofah
- gem install Remarkably dalli erector ezamar innate liquid locale localmemcache lokar maruku
- gem install nagoro rack-contrib redis sass sequel slippers tagz tenjin yui-compressor
- gem install ZenTest kpeg netrc pry-doc hpricot rspec-core rspec-mocks flexmock
- gem install rspec-support ammeter astrolabe powerpack rainbow ar rspectacular timecop
- gem install warning_filter bundler-unload executable-hooks tf octokit httparty gems
- gem install gpg_status_parser midiator libnotify rb-inotify guard guard-minitest
- gem install shoulda-context shoulda-matchers simplecov-html sprockets rack-protection
- gem install temple closure-compiler coffee-script eco ejs hike uglifier unindent gem_hadar
- gem install tins jeremymcanally-pending packnga power_assert session atomic RedCloth
- gem install asciidoctor contest creole less markaby radius wikicloth yajl-ruby citron hashr
- gem install unf_ext nanotest crack curb em-http-request http httpclient patron typhoeus
- # gem plugins installer
- gem install executable-hooks gem-browse gem-ctags gem-empty gem_info gem-init gem-compare gem-man
- gem install gem-nice-install gem-orphan gem-patch gem-toolbox gem-wrappers graph maven_gem open-gem PushSafety
- gem install rbenv-rehash rubygems-desc rubygems-openpgp rubygems-sandbox rubygems_snapshot rubygems-tasks
- gem install wrapper wrapped qwrapper rapper rafters
- echo "Saved dependency needed in home dir"
- gem dependency > /home/hynt/dependsgem.txt
- #update
- gem update --system
- update_rubygems
- gem tumble
- gem update
- rvm install ruby-head-2.0.0 --url https://github.com/github/ruby.git --branch 2.1
- #rvm install ruby-head-2.2.0 --url https://github.com/github/ruby.git --branch 2.1
- #---------------------------------------------------------------------------------------------------------------
- #---------------------------------------------------------------------------------------------------------------
- #-Plugins Man---------------------------------------------------------------------------------------------------------------
- # executable-hooks
- # https://github.com/mpapis/executable-hooks
- # Extends rubygems to support executables plugins.
- # In gem lib dir create rubygems_executable_plugin.rb:
- # Gem.execute do |original_file|
- # warn("Executing: #{original_file}")
- # end
- #---------------------------------------------------------------------------------------------------------------
- # gem-browse
- # https://github.com/tpope/gem-browse
- # Adds four commands:
- # gem edit opens a gem in your editor
- # gem open opens a gem by name in your editor
- # gem clone clones a gem from GitHub
- # gem browse opens a gem’s homepage in your browser
- #---------------------------------------------------------------------------------------------------------------
- # gem-empty
- # https://github.com/rvm/gem-empty
- # Adds command gem empty to remove all gems from current GEM_HOME.
- #---------------------------------------------------------------------------------------------------------------
- # gem-ctags
- # https://github.com/tpope/gem-ctags
- # Adds a gem ctags command to invoke the Exuberant Ctags indexer on already-installed gems, and then automatically invokes it on gems as they are installed.
- #---------------------------------------------------------------------------------------------------------------
- # gem_info
- # https://github.com/oggy/gem_info
- # Adds a gem info command with fuzzy matching on name and version. Designed for scripting use.
- #---------------------------------------------------------------------------------------------------------------
- # gem-init
- # https://github.com/mwhuss/gem-init
- # Adds gem init to create a barebones gem.
- #---------------------------------------------------------------------------------------------------------------
- # gem-compare
- # https://github.com/strzibny/gem-compare
- # Adds gem compare command that can help you to track upstream changes in the released .gem files by comparing gemspec values, gemspec and Gemfile dependencies and # # files.
- #---------------------------------------------------------------------------------------------------------------
- # gem-man
- # https://github.com/defunkt/gem-ma
- # The gem man command lets you view a gem’s man page.
- #---------------------------------------------------------------------------------------------------------------
- # gem-nice-install
- # https://github.com/voxik/gem-nice-install
- # Tries to install system dependencies needed to install your gems with binary extensions using standard gem install command.
- # This currently works only for Fedora, but # hopefully will be extended.
- #---------------------------------------------------------------------------------------------------------------
- # gem-orphan
- # https://github.com/sakuro/gem-orphan
- # Adds a gem orphan command that finds and lists gems on which no other gems are depending.
- #---------------------------------------------------------------------------------------------------------------
- # gem-patch
- # https://github.com/strzibny/gem-patch
- # Adds gem patch command, which enables you to apply patches directly on .gem files. Supports both RubyGems 1.8 and RubyGems 2.0.
- #---------------------------------------------------------------------------------------------------------------
- # gem-toolbox
- # https://github.com/gudleik/gem-toolbox
- # Adds six commands:
- # gem open - opens a gem in your default editor
- # gem cd - changes your working directory to the gem’s source root
- # gem readme - locates and displays a gem’s readme file
- # gem history - locates and display’s a gem’s changelog
- # gem doc - Browse a gem’s documentation in your default browser
- # gem visit - Open a gem’s homepage in your default browser
- #---------------------------------------------------------------------------------------------------------------
- # gem-wrappers
- # https://github.com/rvm/gem-wrappers
- # Create gem wrappers for easy use of gems in cron and other system locations.
- # By default wrappers are installed when a gem is installed.
- # Adds this commands:
- # gem wrappers regenerate - force rebuilding wrappers for all gem executables
- # gem wrappers - show current configuration
- #---------------------------------------------------------------------------------------------------------------
- # graph
- # https://github.com/seattlerb/graph
- # Adds a gem graph command to output a gem dependency graph in graphviz’s dot format.
- #---------------------------------------------------------------------------------------------------------------
- # maven_gem
- # https://github.com/jruby/maven_gem
- # Adds gem maven to install any Maven-published Java library as though it were a gem.
- #---------------------------------------------------------------------------------------------------------------
- # open_gem
- # https://github.com/adamsanderson/open_gem
- # Adds two commands:
- # gem open opens a gem in your default editor
- # gem read opens a gem’s rdoc in your default browser
- #---------------------------------------------------------------------------------------------------------------
- # PushSafety
- # https://github.com/jdleesmiller/push_safety
- # Applies a whitelist to gem push to prevent accidentally pushing private gems to the public RubyGems repository.
- #---------------------------------------------------------------------------------------------------------------
- # rbenv-rehash
- # https://github.com/scoz/rbenv-rehash
- # Automatically runs rbenv rehash after installing or uninstalling gems.
- #---------------------------------------------------------------------------------------------------------------
- # rubygems-desc
- # https://github.com/chad/rubygems-desc
- # Adds gem desc to describe a gem by name.
- #---------------------------------------------------------------------------------------------------------------
- # rubygems-openpgp
- # https://github.com/grant-olson/rubygems-openpgp
- # Adds commands and flags to allow OpenPGP signing of gems.
- # gem sign foo.gem to sign a gem.
- # gem verify foo.gem --trust to verify a gem.
- # gem build foo.gemspec --sign to sign at build time.
- # gem install foo --verify --trust to verify on install.
- #---------------------------------------------------------------------------------------------------------------
- # rubygems-sandbox
- # https://github.com/seattlerb/rubygems-sandbox
- # Manages command-line gem tools and dependencies with a gem sandbox command.
- # This lets you install things like flay and rdoc outside of the global rubygems repository.
- #---------------------------------------------------------------------------------------------------------------
- # rubygems_snapshot
- # https://github.com/rogerleite/rubygems_snapshot
- # Adds gem snapshot to create exports of all your current gems into a single file that you can import later.
- #---------------------------------------------------------------------------------------------------------------
- # rubygems-tasks
- # https://github.com/postmodern/rubygems-tasks
- # rubygems-tasks provides agnostic and unobtrusive Rake tasks for building, installing and releasing Ruby Gems.
- #---------------------------------------------------------------------------------------------------------------
- #repair
- rvm repair environments
- rvm repair symlinks
- rvm repair archives
- rvm repair all
- #offline installer gem files
- gem install -i /home/hynt/tmp/ cucumber -v 0.10.7
- gem install -f --local /home/hynt/tmp/*.gem
- # Temp - Not get tested..........................................
- #Specify your dependencies in a Gemfile in your project's root:
- #source 'https://rubygems.org'
- #gem 'nokogiri'
- #gem 'rack', '~>1.1'
- #gem 'rspec', :require => 'spec'
- #bundle install
- #git add Gemfile Gemfile.lock
- #require 'rubygems'
- #require 'bundler/setup'
- #require 'nokogiri'
- #bundle exec rspec spec/models
- #However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine.
- #Finally, if you want a way to get a shortcut to gems in your bundle:
- #bundle install --binstubs
- #bin/rspec spec/model
youtube-dl --version
to make sure you are using a halfway up-to-date version of youtube-dl. Since web services are often changing, we recommend the newest version (2014.09.14.3 as of writing), but you'll need at least 2014.05.25 for some YouTube videos, since YouTube changed their API on June 25th, 2014. It looks like you used a package manager such asapt-get
to install youtube-dl. Please contact the Linux Mint support and request a not-totally-outdated version of the youtube-dl package. (Sorry, since we are not affilliated with Linux Mint, we cannot change what they are distributing)Alternatively, uninstall the youtube-dl package and follow our manual installation instructions. In a pinch, this should do if you used apt-get before to install youtube-dl: