Skip to content

Instantly share code, notes, and snippets.

git config credential.helper store
git pull
enter your password
your done
https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps
In short:
CTRL+r backwards and CTRL+s forward search
@aonurdemir
aonurdemir / commands.md
Last active October 12, 2020 19:44
Run docker services locally

Docker Commands

Redis

$ docker volume create redis_data
$ docker run -d --mount source=redis_data,target=/data -p 6379:6379 redis redis-server

MySQL

$ docker run -d -p 3306:3306 -e MYSQL_DATABASE=homestead -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=homestead -e MYSQL_PASSWORD=password mysql:5.7.22
nmap <IP-ADDRESS> -- list ports
Well, there are a few things you can check: Are you querying the right port on the client side ? Is your service started ? Is it listening on the right port ?
Those three questions will generally help you solve your issue.
Quick generic command to be entered on the server (the machine that runs the service)
Checking that the service is listening on the expected port
@aonurdemir
aonurdemir / api.txt
Last active March 4, 2024 01:38
Open API Specification Tools
https://www.apicur.io/
stoplight.io
@aonurdemir
aonurdemir / load test.txt
Last active April 15, 2019 06:05
LOAD TESTING TOOLS
Blazemeter, JMeter, SOASTA (now CloudTest), gatling and locust, http://gettaurus.org/
Blazermeter uses JMeter, Gatling, Selenium & Taurus
AB [8:23 PM]
Hey folks, not sure where to ask this, but has anyone ever discussed *load/perf testing* in this workspace? Curious what services/tools folks are using (or like/love) tied to this. We've used Blazemeter, JMeter, SOASTA (now CloudTest). Thanks!
MH [8:36 PM]
I’m a fan of gatling and locust.
@aonurdemir
aonurdemir / xdebug
Created December 26, 2018 16:08
xdebug
https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
https://www.jetbrains.com/help/phpstorm/debugging-a-php-cli-script.html
@aonurdemir
aonurdemir / leaderboard.sql
Last active November 10, 2018 16:23
Mysql user variables and conditional where clauses
#query orders users wrt their points. Then chooses 11 users regarding below
#if searched user's rank <=9, get full 11.
#else get the searched user and 2 others below and above him/her and merge with the first 6 users.
select
rank,
`current_user`,
total
from (
select
@rank := IF(@current_user = fullboard.user_id, 1, @rank + 1) as rank,
@aonurdemir
aonurdemir / info.txt
Last active July 6, 2020 22:14
Docker image manipulations
http://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html
precondition: docker should be installed and you should be logged in in your system.
precondition2: use .dockerignore file near the Dockerfile as:
*
!Dockerfile
in the folder where Docker file resides, run:
docker build .
@aonurdemir
aonurdemir / Dockerfile
Last active October 25, 2018 07:44
Docker ubuntu php
FROM php:7.2-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install -j$(nproc) pdo pdo_mysql
&& docker-php-ext-install -j$(nproc) bcmath