Skip to content

Instantly share code, notes, and snippets.

Kemal Yenilmez gazatem

Block or report user

Report or block gazatem

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fce48176c12dd544013cd8ed33ce231a
<?php
// Delegate static file requests back to the PHP built-in webserver
if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) {
return false;
}
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
@gazatem
gazatem / package.json
Created Apr 19, 2018
Node.js Apps Using ES6
View package.json
{
"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"
},
@gazatem
gazatem / Main.java
Created Mar 5, 2018
Blockchain oluşturan örnek projemizin kalbi ve main methodu
View Main.java
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;
@gazatem
gazatem / Block.java
Created Mar 5, 2018
Basit bir BlockChain modeli
View Block.java
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;
View zero-downtime.sh
# 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
@gazatem
gazatem / React-Directory-Layout.md
Created Sep 29, 2016 — forked from koistya/React-Directory-Layout.md
File and folder naming convention for React.js components
View React-Directory-Layout.md

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
View Stop or remove docker containers
One liner to stop / remove all of Docker containers:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
View gist:b0b0cefa4258011af5d9
----- 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
View gist:6baf66ceda9000c51c1f
----- 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
@gazatem
gazatem / gist:fe05bcc941faf3c9080e
Created Jun 14, 2014
Install PHP on Mac easily
View gist:fe05bcc941faf3c9080e
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?
You can’t perform that action at this time.