Skip to content

Instantly share code, notes, and snippets.

View taheri24's full-sized avatar
🎯
Focusing

Majid Taheri taheri24

🎯
Focusing
  • qlub.io
  • Istanbul
View GitHub Profile
@taheri24
taheri24 / java_install.sh
Created November 20, 2016 11:59 — forked from rjurney/java_install.sh
How to automagically install Oracle JDK 1.8 on CentOS
# Install Java 1.8 in CentOS/RHEL 6.X
sudo yum remove -y java-1.6.0-openjdk
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \
-O jdk-8-linux-x64.rpm
sudo rpm -Uvh jdk-8-linux-x64.rpm
sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0/jre/bin/java 20000
sudo alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0/bin/jar 20000
@taheri24
taheri24 / IndexedDB101.js
Created November 9, 2016 10:23 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@taheri24
taheri24 / openresty-ubuntu-install.sh
Last active October 29, 2016 11:04 — forked from alex-roman/openresty-ubuntu-install.sh
Easy install openresty & NVM (used and tested on Ubuntu 14.04, 15.10 and 16.04)
#!/bin/bash
###########################################
################# OPENRESTY ###############
###########################################
apt-get -y update
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev libdrizzle-dev
wget https://openresty.org/download/drizzle7-2011.07.21.tar.gz
tar xzvf drizzle7-2011.07.21.tar.gz
cd drizzle7-2011.07.21/
./configure --without-server
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@taheri24
taheri24 / gist:b34c9709b9612d20170c9ba1ba9ec961
Created August 14, 2016 05:04 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi and python

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@taheri24
taheri24 / gist:4e46ac58429c42596600d48953f0ad72
Created August 14, 2016 04:38 — forked from scottnix/gist:10430003
Gulpfile.js Sample, latest
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
markdown = require('gulp-markdown'),
@taheri24
taheri24 / gulpfile.js
Created August 14, 2016 04:36 — forked from demisx/gulpfile.js
Gulp 4 gulpfile.js as WebPack
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
@taheri24
taheri24 / webpack.config.js
Created August 9, 2016 12:32 — forked from lastlegion/webpack.config.js
Minimal webpack config to get started with React and ES2015
module.exports = {
entry: "./public/javascripts/src/App.jsx", //entry point of your app
output: {
filename: "./public/javascripts/build/bundle.js" //output transpiled and compiled code
},
module: {
loaders:[
{
test: /\.js[x]?$/, //list of extensions
exclude: /node_modules/,
@taheri24
taheri24 / install-openresty.sh
Last active August 7, 2016 12:18
install openresty
wget https://openresty.org/download/openresty-1.9.15.1.tar.gz
tar -xvf openresty-1.9.15.1.tar.gz
apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
cd openresty-1.9.15.1
./configure --with-luajit
make
make install
cd ..
@taheri24
taheri24 / .travis.yml
Created August 5, 2016 13:09 — forked from tomchentw/.travis.yml
React.js + Bootstrap.scss + Webpack configuration files
language: node_js
node_js:
- '0.10'
install: npm run dev_install
env:
global:
secure: CODECLIMATE_TOKEN