Skip to content

Instantly share code, notes, and snippets.

View kemalyen's full-sized avatar

Kemal Yenilmez kemalyen

  • Basingstoke / UK
View GitHub Profile
$queries = DB::getQueryLog();
$last_query = end($queries);
@kemalyen
kemalyen / gist:fe05bcc941faf3c9080e
Created June 14, 2014 07:33
Install PHP on Mac easily
Install php on Mac
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
export PATH=/usr/local/php5/bin:$PATH
Why is Europe/Zurich the default timezone? Where to change that?
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
One liner to stop / remove all of Docker containers:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@kemalyen
kemalyen / React-Directory-Layout.md
Created September 29, 2016 07:12 — forked from koistya/React-Directory-Layout.md
File and folder naming convention for React.js components

File and folder naming convention for React.js components

Directory Layout #1

/actions/...
/components/common/Link.js
/components/common/...
/components/forms/TextBox.js
/components/forms/TextBox.res/style.css
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/weather-deploy" ]; then
rm -R /home/forge/weather-deploy
fi
if [ -d "/home/forge/weather-backup" ]; then
rm -R /home/forge/weather-backup
fi
@kemalyen
kemalyen / Block.java
Created March 5, 2018 19:18
Basit bir BlockChain modeli
package com.gazatem.java.blockchain.tutorial.model;
import java.util.Date;
public class Block {
private String hash;
private String previousHash;
private String storedData;
private long timeStamp;
private int nonce;
@kemalyen
kemalyen / Main.java
Created March 5, 2018 19:24
Blockchain oluşturan örnek projemizin kalbi ve main methodu
package com.gazatem.java.blockchain.tutorial;
import com.gazatem.java.blockchain.tutorial.model.Block;
import com.gazatem.java.blockchain.tutorial.service.Calculate;
import java.util.ArrayList;
public class main {
private static Calculate calculate;
@kemalyen
kemalyen / package.json
Created April 19, 2018 12:13
Node.js Apps Using ES6
{
"name": "es6-express",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rimraf dist/ && babel ./ --out-dir dist/ --ignore ./node_modules,./.babelrc,./package.json,./npm-debug.log --copy-files",
"start": "npm run build && node dist/index.js"
},