View Dockerfile with multi-stage build for production
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12-alpine as base | |
WORKDIR /src | |
COPY package.json package-lock.json /src/ | |
COPY . /src | |
EXPOSE 8080 | |
FROM base as production | |
ENV NODE_ENV=production |
View remove env file from git forever
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '.env' >> .gitignore | |
git rm -r --cached .env | |
git add .gitignore | |
git commit -m 'untracking .env' | |
git push origin master |
View remove the idea folder from git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo .idea >> .gitignore | |
git rm -r --cached .idea | |
git add .gitignore | |
git add -u .idea/ | |
git commit -m "remove the .idea folder" |
View install-aws-cli-sam-debian-ubuntu-linux.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eo pipefail | |
which python | |
pip --version | |
sudo pip install setuptools | |
sudo pip install wheel | |
sudo pip install awscli --upgrade |
View static-file-server.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
) | |
func main() { | |
port := flag.String("p", "8100", "port to serve on") |
View update submodule to branch to v1.10.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd pimf-framework/ && \ | |
git fetch --tags && \ | |
git checkout v1.10.0 && \ | |
cd .. && \ | |
git add pimf-framework/ && \ | |
git commit -m "moved submodule to v1.10.0" && \ | |
git push |
View update pimf-bundle to v1.9.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git submodule --quiet sync && | |
git submodule --quiet update --force --init --recursive && | |
git submodule foreach git pull --force origin master && | |
cd pimf-framework/ && | |
git checkout -f v1.9.0 && | |
cd .. && | |
git add pimf-framework && | |
git commit -m "use submoduile at tag v1.9.0" && | |
git push |
View gist:19ab0eeb23f7c8fd5534
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
apc_clear_cache(); | |
apc_clear_cache('user'); | |
apc_clear_cache('opcode'); | |
echo 'success = true'.PHP_EOL; |
View gist:9bdeb4af3874742ec944
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_USER_NOTICE); | |
//checking with === | |
$a = array(); | |
$time = microtime(true); | |
for($i=0;$i<10000;$i++) { | |
if($a[$i] === null) { |
View mysql-sql.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110824 10:13:55 14424 Connect xxxxxx@localhost on | |
14424 Init DB krsteski_doctrine2_test | |
14424 Query DROP TABLE IF EXISTS bookMYSQL | |
14424 Query DROP TABLE IF EXISTS authorMYSQL | |
14424 Query CREATE TABLE bookMYSQL ( | |
id int(11) NOT NULL AUTO_INCREMENT, | |
title varchar(255) NOT NULL, | |
isbn varchar(24) NOT NULL, | |
price decimal(10,0) NOT NULL, | |
authorMYSQL_id int(11) DEFAULT NULL, |
NewerOlder