Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Gjero Krsteski gjerokrsteski

🎯
Focusing
Block or report user

Report or block gjerokrsteski

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
@gjerokrsteski
gjerokrsteski / remove env file from git
Last active Dec 19, 2019
remove env file from git history
View remove env file from git
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@gjerokrsteski
gjerokrsteski / remove the idea folder forever
Created May 23, 2019
remove the .idea folder forever
View remove the idea folder forever
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
#!/usr/bin/env bash
set -eo pipefail
which python
pip --version
sudo pip install setuptools
sudo pip install wheel
sudo pip install awscli --upgrade
@gjerokrsteski
gjerokrsteski / static-file-server.go
Last active Dec 19, 2017
simple static file server in go
View static-file-server.go
package main
import (
"flag"
"log"
"net/http"
)
func main() {
port := flag.String("p", "8100", "port to serve on")
@gjerokrsteski
gjerokrsteski / update submodule to branch to v1.10.0
Last active Dec 8, 2016
update submodule to branch version
View update submodule to branch to v1.10.0
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
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
<?php
apc_clear_cache();
apc_clear_cache('user');
apc_clear_cache('opcode');
echo 'success = true'.PHP_EOL;
@gjerokrsteski
gjerokrsteski / gist:9bdeb4af3874742ec944
Created Mar 11, 2015
is_null($x) vs $x === null in PHP
View gist:9bdeb4af3874742ec944
<?php
error_reporting(E_USER_NOTICE);
//checking with ===
$a = array();
$time = microtime(true);
for($i=0;$i<10000;$i++) {
if($a[$i] === null) {
@gjerokrsteski
gjerokrsteski / mysql-sql.log
Created Sep 9, 2011
SQL-Statements erstellt von MySQLwährend des Benchmarks
View mysql-sql.log
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,
@gjerokrsteski
gjerokrsteski / pdo-sql.log
Created Sep 9, 2011
SQL-Statements erstellt von PDO während des Benchmarks
View pdo-sql.log
110824 10:14:42 14425 Connect xxxxx@localhost on krsteski_doctrine2_test
14425 Query SET NAMES utf8
14425 Query DROP TABLE IF EXISTS bookPDO
14425 Query DROP TABLE IF EXISTS authorPDO
14425 Query CREATE TABLE bookPDO (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL,
isbn varchar(24) NOT NULL,
price decimal(10,0) NOT NULL,
authorPDO_id int(11) DEFAULT NULL,
You can’t perform that action at this time.