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
var containerLeft = ($(window).width() - (this.selection.offset().left + this.selection.outerWidth()) ); | |
var left = ($(window).width() - (this.search.offset().left + this.search.outerWidth())); |
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
# File Management | |
#================== | |
tail -n +$X /path/to/file | head -n $((Y-X+1)) | |
grep -ir -n "ramesh" * | |
find / -iname passwd | |
# Process management | |
#=================== | |
lsof -p PID |
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
%% Copyright | |
-module(jalali). | |
-author("jrad <[email protected]>"). | |
-define( G_DAYS_IN_MONTH, [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ] ). | |
-define( J_DAYS_IN_MONTH, [ 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 ] ). | |
%% API | |
-export([ | |
gregorian_to_jalali/1, |
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
<?php | |
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* flipcss.php 0.4 | |
* by daif alotaibi (http://daif.net) | |
* [email protected] |
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
/* | |
FarsiType | |
Version: 1.3.6 | |
http://www.farsitype.ir | |
This script developed to ease typing Farsi (Persian) in web forms where there is no Farsi Keyboard installed on a PC. | |
Works with Internet Explorer, FireFox, Opera and Chrome. | |
For more information and getting the using manual please visit the script website (http://www.farsitype.ir). | |
Copyright 2002-2011 Kaveh Ahmadi (http://www.kavehahmadi.com, email: [email protected]). |
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
yum update | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm | |
# to --enablerepo=remi | |
nano /etc/yum.repos.d/remi.repo | |
yum install redis -y | |
chkconfig redis on | |
# From EPEL | |
yum install npm |
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
# firs make sure EPEL & REMI repos are enabled! | |
yum -y install erlang mercurial gcc gcc-c++ make librsvg2-devel lcms-devel libjpeg-devel libpng-devel jasper-devel fontconfig-devel freetype-devel libxml2-devel libtiff-devel bzip2-devel ncurses-devel openssl-devel | |
yum install ImageMagick | |
rpm -Uvh http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm | |
su - postgres -c /usr/pgsql-9.2/bin/initdb | |
chkconfig --levels 235 postgresql-9.2 on | |
vim /etc/postgresql/<pg version>/main/pg_hba.conf |
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
/* | |
This is an experimental HashMap implementation with some features I needed and didn't found in JS default Arrays and Objects | |
Features : | |
* Direct acces too elements throught .get(key) | |
* fast keys or values iteration using for (;;) instead of for in syntax (http://jsperf.com/array-keys-vs-object-keys-iteration/3 ) | |
*/ | |
class HashMap { | |
public length: number = 0; |
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 | |
# | |
# Service script for a Node.js application running under Forever. | |
# | |
# This is suitable for Fedora, Red Hat, CentOS and similar distributions. | |
# It will not work on Ubuntu or other Debian-style distributions! | |
# | |
# There is some perhaps unnecessary complexity going on in the relationship between | |
# Forever and the server process. See: https://github.com/indexzero/forever | |
# |
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
upstream myapp_upstream { | |
server 127.0.0.1:3000; | |
keepalive 64; | |
} | |
server { | |
listen 8080; | |
server_name myapp.com; |
OlderNewer