Skip to content

Instantly share code, notes, and snippets.

View sajanp's full-sized avatar

Sajan Parikh sajanp

  • COS Systems
  • Pittsburgh, PA
View GitHub Profile
@sajanp
sajanp / email-signature
Last active December 11, 2015 21:49
My email signature for Thunderbird. Hate having to log into Amazon S3 and get the URL of the logo image and retype everything. Although, as I'm typing this description, I just realized I could copy and paste this signature from any email in my sent folder. Doh!
Sajan Parikh<br />
<i>Owner, Noppix LLC</i><br /><br />
e: sajan@noppix.com<br />
o: (563) 726-0371<br />
c: (563) 447-0822<br /><br />
<img alt="Noppix LLC Logo" src="https://s3.amazonaws.com/Noppix_Media/Email_Signatures/NewNoppixEmailLogo.png" />
# Rerun the install script, recording the files installed.
python setup.py install --record files.txt
# Then, loop through the file removing everything.
cat files.txt | xargs rm -rf
@sajanp
sajanp / .htaccess
Created January 27, 2013 23:34
CodeIgniter .htaccess file. Check the baseurl and default controller on line 10.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
### Canonicalize codeigniter URLs
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(main(/index)?|index(\.php)?)/?$ / [L,R=301]
@sajanp
sajanp / AptanaStudio3.desktop
Last active December 11, 2015 19:39
Desktop launcher for Aptana Studio 3. Requires Aptana to be unzipped into /opt and the included icon.xpm be convered to icon.png.
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Aptana Studio 3
GenericName=Integrated Development Environment
Comment=Aptana Strudio 3 Integrated Development Environment
Exec=/opt/Aptana_Studio_3/AptanaStudio3 %F
TryExec=/opt/Aptana_Studio_3/AptanaStudio3
Icon=/opt/Aptana_Studio_3/icon.png
StartupNotify=true
@sajanp
sajanp / CrashPlan.desktop
Created December 28, 2012 23:22
Desktop launcher for CrashPlan on Ubuntu 12.10. This file should be saved as /usr/share/applications/CrashPlan.desktop after you've installed CrashPlan. http://youtu.be/M6yBe8Gh3O4
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=CrashPlan
Categories=System;
Comment=CrashPlan Desktop
Exec=/usr/local/bin/CrashPlanDesktop
Icon=/usr/local/crashplan/skin/icon_app_128x128.png
Hidden=false
Terminal=false
@sajanp
sajanp / steam-system-info.txt
Created December 28, 2012 10:34
System information for steam debugging.
Processor Information:
Vendor: GenuineIntel
Speed: 2400 Mhz
4 logical processors
4 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
@sajanp
sajanp / php-nav-list-active.php
Created December 27, 2012 21:14
An example of using shorthand if/else to conditionally use an 'active' class on a nav list item.
<li class="<?= ($nav_active == 1 ? 'active' : ''); ?>"><a href="#">Home</a></li>
// If $nav_active equals the integer 1 then echo 'active' else echo '' (nothing)