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
convert -resize 640 -delay 120 -loop 0 *.JPG animated.gif |
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
for i in */; do zip -r "${i%/}.zip" "$i"; done | |
# taken from http://stackoverflow.com/a/20452562 |
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
--- | |
layout: null | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | |
<channel> | |
<title>{{ site.title | xml_escape }}</title> | |
<description>{{ site.description | xml_escape }}</description> | |
<link>{{ site.url }}{{ site.baseurl }}/</link> |
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/bash | |
####for 64 bit Linux only | |
sudo apt-get install ia32-libs | |
sudo apt-get install libc6-i386 | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install libglu1-mesa:i386 | |
sudo apt-get install libxcursor1 libxcursor-dev | |
sudo apt-get install libxcursor1:i386 |
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
#ssid.conf | |
<VirtualHost amitssid.com:80> | |
ServerName amitssid.com | |
ServerAlias www.amitssid.com | |
DocumentRoot /var/www/html/SSID/app | |
ServerAdmin webmaster@localhost | |
RailsEnv production | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |
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
import java.util.Calendar; | |
import java.util.Random; | |
/** | |
* Just did it for fun. :| | |
* | |
* @author amit | |
* | |
*/ | |
public class NameGenerator { |
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/bash | |
#<- this is a comment. | |
newport=2222 | |
forwardport=27960 | |
sudo iptables -t nat -A PREROUTING -p udp --dport $newport -j REDIRECT --to-ports $forwardport | |
#To check whether this rule works, type this command | |
#sudo iptables -nL -v --line-numbers -t nat |
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
import subprocess | |
cmd_list_jpg = 'ls -C -1 | grep .jpg' | |
all_files = subprocess.check_output(cmd_list_jpg, shell = True) | |
for i in all_files.split('\n'): | |
if i.find('convert') != -1: | |
continue | |
subprocess.check_output('convert {0} {0}.pdf'.format(i), shell = True) |
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/sh | |
# Install Brightness Controller script | |
# Download / Save this script. Make it executable. Run it. | |
# It requires having wget installed, if you use another command line interface downloader, change wget to it. | |
wget https://github.com/lordamit/Brightness/archive/master.zip | |
unzip -o master.zip -d ~/.Brightness | |
rm master.zip | |
echo "[Desktop Entry] | |
Encoding=UTF-8 |
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/bash | |
pdftk *.pdf cat output output.pdf |