Skip to content

Instantly share code, notes, and snippets.

jQuery(function ($) {
$("#typed").typed({
stringsElement: $('#typing_effect'),
typeSpeed: -50,
startDelay: 1500
});
});
@janmejai
janmejai / enqueue typed scripts in WordPress
Last active February 26, 2017 13:35
enqueue typed scripts in WordPress
//* Enqueue typed scripts
add_action( 'wp_enqueue_scripts', 'my_typed_scripts' );
function my_typed_scripts() {
wp_enqueue_script( 'typed', get_stylesheet_directory_uri() . '/js/typed.js', array( 'jquery' ) ); // edit js file location
}
@janmejai
janmejai / NGINX Rewrite rules for CodeIgniter
Created October 9, 2016 10:02
NGINX Rewrite rules for CodeIgniter
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name domainname.com;
root /var/pro/; #change this with the right location
index index.php index.html index.htm;
location / {
LOAD DATA INFILE 'FileLocation/filename.csv'
INTO TABLE tablename
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
mysql -u username -p databasename -B -e "select * from tablename;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > tablename.csv
mkdir /root/imdb_data
cd /root/imdb_data
wget -r --accept="*.gz" --no-directories --no-host-directories --level 1 ftp://ftp.fu-berlin.de/pub/misc/movies/database/
imdbpy2sql.py -d /root/imdb_data -c /root/imdb_data -u 'mysql://imdb:imdb@localhost/imdb'
CREATE DATABASE imdb;
GRANT ALL PRIVILEGES ON imdb.* TO 'user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
wget http://prdownloads.sourceforge.net/imdbpy/IMDbPY-5.0.tar.gz
tar -xzf IMDbPY-5.1.tar.gz
cd IMDbPY-*
python setup.py install
sudo apt-get install -y gcc python python-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev python-setuptools python-pip
easy_install -U SQLObject