Skip to content

Instantly share code, notes, and snippets.

View aindong's full-sized avatar
🎯
Focusing

Alleo Indong aindong

🎯
Focusing
View GitHub Profile
@aindong
aindong / nginx.default.conf
Last active November 18, 2015 16:37 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php56-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap
@aindong
aindong / webpack.config.js
Last active December 10, 2015 12:12
multiple entry with babel loader webpack config
var path = require("path");
module.exports = {
entry: {
LoginBundle: "./public/src/login/index.js"
},
output: {
path: path.join(__dirname, "./"),
filename: "[name].js"
},
@aindong
aindong / Toolbar Back icon not working fix
Last active February 20, 2016 15:55
Toolbar Back icon not working fix
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
@aindong
aindong / Fix Git Ignore
Created June 1, 2016 03:49
FIX GIT IGNORE
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
@aindong
aindong / aws-micro-composer-fix
Created August 9, 2016 16:20
Fix Composer Out Of Memory Error by adding swap memory to your aws micro instance
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
@aindong
aindong / fetch.js
Created August 19, 2016 13:25
Generic Fetch option
import {
getAuthToken
} from './token.js';
export const fetchOpts = (method, body = null) => {
return Object.assign({}, {
method,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': `Bearer ${getAuthToken()}`
import java.io.*;
import java.util.Scanner;
class GuessMyNumber {
protected int min = 1;
protected int max = 31;
public static void main(String args[])
{
GuessMyNumber instance = new GuessMyNumber();
@aindong
aindong / foundation.reveal.react.js
Last active September 15, 2016 09:01
foundation.reveal.react.js
window.PainDiagramModal = React.createClass({
statics: {
open: function(){
this.$dialog = $('#diagramModal');
if (!this.$dialog.length) {
this.$dialog = $('<div id="diagramModal" class="reveal-modal" data-reveal role="dialog"></div>')
.appendTo('body');
}
@aindong
aindong / zip.sh
Last active November 20, 2016 11:18
Zip new files into different archive, LINuX
zip -r Scripts.zip Scripts -DF --out new.zip
export default function constFactory(entityName) {
const ENTITY = entityName.toUpperCase();
return {
LOAD_START: `LOAD_${ENTITY}S_START`,
LOAD_SUCCESS: `LOAD_${ENTITY}S_SUCCESS`,
LOAD_NO_CONNECTION: `LOAD_${ENTITY}S_NO_CONNECTION`,
LOAD_ERROR: `LOAD_${ENTITY}S_ERROR`,