- Install Dependencies
npm init npm install --save-dev ts-node typescript tslib express @types/express
- Create
server.ts
in root folder of your app.
# cd | |
alias emacs="emacs -nw" | |
: ' | |
# ssh agent | |
env=~/.ssh/agent.env | |
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } |
;(setq mac-option-key-is-meta nil) | |
;(setq mac-command-key-is-meta nil) | |
;(setq mac-command-modifier 'cmd) | |
(setq mac-option-modifier 'meta) | |
(setq mac-right-option-modifier nil) |
# emacs. make emacs default editor | |
export VISUAL=$EDITOR | |
export EDITOR=emacs | |
# git. source git-completion.bash for autocomplete in git | |
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash | |
# git. source git-prompt.sh to eb able to modify PS1 with git info | |
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 |
function f(x) { | |
return function g(y) { | |
x = x + y; | |
return x; | |
} | |
} | |
g1 = f(3); | |
// her çağrılışında aynı argümanla bile yeni bir değer döner |
(when (>= emacs-major-version 24) | |
(require 'package) | |
(add-to-list | |
'package-archives | |
;; '("melpa-stable" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable | |
'("melpa" . "http://melpa.milkbox.net/packages/") | |
t) | |
) | |
(custom-set-variables |
export NVM_DIR="$HOME/.nvm" | |
. "/usr/local/opt/nvm/nvm.sh" | |
alias ls="ls -FGh" | |
alias rm="rm -i" | |
# show git status if in git repo http://ezprompt.net/ | |
## get current branch in git repo |
(defun reverse (l acc) | |
(cond | |
((null l) acc) | |
(t (reverse (cdr l) (cons (car l) acc))))) | |
; (reverse '(7 5 1 3)) => (3 1 5 7) |
'use strict'; | |
const Hapi = require('@hapi/hapi'); | |
const util = require('util'); | |
const fs = require("fs"); | |
const readFile = util.promisify(fs.readFile); | |
const writeFile = util.promisify(fs.writeFile); | |
function bootstrap_db () { |
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
(custom-set-variables |