Skip to content

Instantly share code, notes, and snippets.

@mifas
mifas / 0_reuse_code.js
Created October 4, 2013 10:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mifas
mifas / jquery_fallback.js
Created October 8, 2013 06:20
jQuery fallback
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="path/to/your/jquery"><\/script>')</script>
@mifas
mifas / Laravel PHP7 LEMP AWS.md
Created June 28, 2017 06:36 — forked from angeant/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@mifas
mifas / Virtual Blocks on Nginx.md
Created June 28, 2017 06:36 — forked from santoshachari/Virtual Blocks on Nginx.md
Setup additional sites on Nginx

Inspired and edited from this Digital Ocean tutorial.

Follow the steps on this gist to setup a LEMP stack with PHP 7.0.

The steps assume Nginx has been configured correctly.

Setup the root directories

For the domains example.com and test.com, create the folders.

@mifas
mifas / tmux.conf
Last active March 14, 2018 00:58 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@mifas
mifas / temp
Last active January 9, 2019 17:36
"[Palenight Theme]": {
"sideBar.border": "#00000030",
"tab.border": "#0000006c",
"statusBar.border": "#00000030",
"tab.activeBorderTop": "#4d028a",
"tab.activeBorder": "#00000030",
"editorGroupHeader.tabsBorder": "#00000030",
"titleBar.border": "#00000030",
"panel.border": "#00000030",
"activityBar.border": "#00000030",
@mifas
mifas / bash.sh
Created January 14, 2019 10:07
Create React App default code cleanup
function craclean(){
rm -rf $1/src/App.js $1/src/App.css $1/src/App.test.js $1/src/index.css $1/src/logo.svg
cat << EOS > $1/src/App.js
import React, { Component } from 'react'
export default class App extends Component {
render() {
return (
<div>
App
</div>
@mifas
mifas / jsconfig.json
Last active April 22, 2019 07:03
jsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"paths": {
"*": ["./src/*"]
}
},
@mifas
mifas / launch.json
Created May 16, 2019 22:01
Debug React apps directly from VS Code
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src"
}
@mifas
mifas / mnews.css
Last active October 9, 2019 00:38
stylebot - md
#header-wrapper, #menu-top, #menu-1, .ads-top-big, .sidebar-right, .ads-top-big1, #footer-wrapper,.farhacool,.farhacool1 {
display: none;
}
#outer-wrapper{
box-shadow: unset;
}
================= j