Skip to content

Instantly share code, notes, and snippets.

View janoka's full-sized avatar

Janos Kuszing janoka

  • Netstudio
  • Székesfehérvár, Hungary
View GitHub Profile

Keybase proof

I hereby claim:

  • I am janoka on github.
  • I am janoka (https://keybase.io/janoka) on keybase.
  • I have a public key ASDjHltj6K79PQl77YjlZkT7vmaofz2wci5Ds8rWqV5-Cwo

To claim this, I am signing this object:

#!/bin/bash
#Config
LOCAL_DEV_PATH="$HOME/www/project/web"
LOCAL_DEV_URL='project.dev'
PHP_VERSION='7.1'
USER=$(whoami)
# Install
@janoka
janoka / README.md
Last active July 27, 2017 08:40
Self signed ssl

Creating a Self CA

This is not part of the official process.

# Creating a CA key:
#   req -new -x509            - New x509-es request.
#   -nodes                    - Private key do not be secured by passphrase.
#   -days 3650                - 10*365=3650 day, it means 10 years.
#   -newkey rsa:2048 -sha256  - 2048-as RSA, with SHA256
@janoka
janoka / ext-xdebug.ini
Last active March 20, 2017 19:40
General PHP settings on MacOS
; Location: /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
[xdebug]
zend_extension="/usr/local/opt/php56-xdebug/xdebug.so"
xdebug.idekey=PHPSTORM
xdebug.remote_enable = On
xdebug.remote_connect_back = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = profiler.%t.%R
# Location: /usr/local/etc/nginx/sites-available/dev.conf
# Run: ln -s /usr/local/etc/nginx/sites-available/dev.conf /usr/local/etc/nginx/sites-enabled/dev.conf
server {
listen 80;
server_name ~^(?<sitename>.+\.dev)$;
root /Users/__username__/www/$sitename.dev;
# access_log /usr/local/var/log/nginx/$sitename.dev.access.log;
access_log off;
error_log /usr/local/var/log/nginx/$sitename.dev.error.log;
# error_log off;
[user]
name =
email =
[color]
ui = true
[alias]
# See: http://stackoverflow.com/questions/7066325/how-to-list-show-git-aliases
# General aliases =====
h = help # ... general help from git commands
# la = "!grep ' =' ~/.gitconfig | sed -e 's/=/\\x1b[0;31m=\\x1b[0m/g' | sed -e 's/#.*/\\x1b[0;32m&\\x1b[0m/g' | less -R"
@janoka
janoka / my.cnf
Created October 30, 2016 13:00
OSX Mysql my.cnf
[client]
port = 3306
socket = /usr/local/var/run/mysql/mysqld.sock
[mysqld_safe]
open_files_limit = 16384
[mysqld]
user = janoka
pid-file = /usr/local/var/run/mysql/mysqld.pid
@janoka
janoka / .zshrc_devel
Last active February 19, 2017 11:24
Zsh resources
#!/bin/zsh
# Development
# SSH agent load
{ eval `ssh-agent`; ssh-add -K ~/.ssh/id_rsa} &>/dev/null
# Drush
alias d='drush'
alias dy='drush -y'
alias ddl='drush dl'
@janoka
janoka / toggleiTerm2icon
Created April 6, 2016 09:31 — forked from lg0/toggleiTerm2icon
show/hide iTerm2 Dock icon
# toggle iTerm Dock icon
# add this to your .bash_profile or .zshrc
function toggleiTerm() {
pb='/usr/libexec/PlistBuddy'
iTerm='/Applications/iTerm.app/Contents/Info.plist'
echo "Do you wish to hide iTerm in Dock?"
select ync in "Hide" "Show" "Cancel"; do
case $ync in
'Hide' )
drush eval 'drupal_set_installed_schema_version("module_name", version)'
# E.g.:
# drush sqlc "drupal_set_installed_schema_version('dt_core', 7154);
# Where 7154 could be the current version-1.