Skip to content

Instantly share code, notes, and snippets.

@raksa
raksa / test-php.sh
Created December 19, 2018 13:46
quick test php from git src
#! /bin/sh
#xcode-select --install
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#brew install bison
#brew install wget
#brew install openssl
#brew install libxml2
#brew link libxml2 --force
https://stackoverflow.com/questions/37879448/mysql-fails-on-mysql-error-1524-hy000-plugin-auth-socket-is-not-loaded
@raksa
raksa / clip.md
Last active January 3, 2019 08:05
pipe output to clipboard
  • windows > dir /b | clip
  • linux $ ls | xclip -se c
  • mac $ ls | pbcopy
@raksa
raksa / nginx.conf
Last active January 21, 2019 16:46
nginx + php for Laravel project on Windows
# run php-cgi.php -b 127.0.0.1:9123
server {
listen 8000;
listen [::]:8000;
server_name blog.local;
root c:/www/blog;
index index.php index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
@raksa
raksa / .env.pipelines
Created March 1, 2019 07:15
Bitbucket pipelines for Laravel 5
APP_NAME=app
APP_ENV=local
APP_KEY=base64:wE9tKIHu8aQGcLu6oZfUcqD/U3jdOgYrcoZ/UqY8K2c=
APP_DEBUG=true
APP_URL=http://localhost:8000
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
@raksa
raksa / https-vhos.conf
Created March 1, 2019 07:19
config apahce https virtual host
<VirtualHost *:443>
DocumentRoot "/dir/to/document"
ServerName domain
SSLEngine on
SSLCertificateFile /dir/to/cert/file.pem
SSLCertificateKeyFile /dir/to/cert/file.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
</VirtualHost>

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Pytest",
"type": "python",
"request": "launch",
@raksa
raksa / php.ini
Last active August 7, 2021 15:53
xdebug php
[xdebug]
zend_extension="<path/to/xdebug.so>"
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_autostart=1
@raksa
raksa / gitconfig
Created June 22, 2021 23:17
helpful config for GPG commit sign
[init]
defaultBranch = master
[user]
name = <username>
email = <email>
signingkey = <GnuPG key id>
[core]
editor = code
[commit]
gpgsign = true