Skip to content

Instantly share code, notes, and snippets.

@minimedj
minimedj / Guide.md
Created October 6, 2021 11:19 — forked from symdesign/Guide.md

Install LAMP

Configure PHP/MySQL for Froxlor

Change the MySQL root password

use mysql;
update user set authentication_string=PASSWORD("PASSWORD!") where User='root';
flush privileges;
@minimedj
minimedj / uwgi-medium-post.ini
Created March 3, 2021 15:07 — forked from sumitsk20/uwgi-medium-post.ini
uwsgi configuration with most commonly sused options for highly scalable website (medium blog post)
[uwsgi]
# telling user to execute file
uid = bunny
# telling group to execute file
gid = webapps
# name of project you during "django-admin startproject <name>"
project_name = updateMe
@minimedj
minimedj / functions_custom-cols.php
Created January 30, 2021 18:53 — forked from morgyface/functions_custom-cols.php
WordPress | Advanced Custom Fields | Create custom columns within admin for a custom post type using ACF
<?php
// Change the columns for the releases list screen
function change_columns( $cols ) {
$cols = array(
'cb' => '<input type="checkbox" />',
'featimg' => 'Featured Image',
'excerpt' => 'Excerpt?',
'title' => 'Title',
'artist' => 'Artist',
'catno' => 'Cat#',
@minimedj
minimedj / gist:38cda8e1a10f36c083a71d8728b54fc8
Last active December 19, 2017 14:35
DataGrid crash.... Here is video that leads to the crash: https://monosnap.com/file/4qxKIVKLrhZ6mxYa59viGHnmB9H2BC
Date/Time: 2017-12-19 15:29:34 +0100
OS Version: Mac OS X 10.12.6 (Build 16G1036)
Architecture: x86_64h
Report Version: 25
Data Source: Stackshots
Command: datagrip
Path: /Users/USER/Library/Application Support/JetBrains/*/DataGrip.app/Contents/MacOS/datagrip
Version: 2017.3.2 (DB-173.3942.44)
@minimedj
minimedj / creating_keys.md
Created October 5, 2017 07:04
Using OpenSSL to create keys for Mac OS X.

Creating Keys

This is a brief guide to creating a public/private key pair that can be used for OpenSSL. While the "easy" version will work, I find it convenient to generate a single PEM bundle and then export the private/public key from that as needed. This document also covers how to add and remove a password from your private key and how to make sure that keychain will automatically unlock it when you sign in.

Just make it work

Generate an ssh key-pair:

@minimedj
minimedj / postgres_queries_and_commands.sql
Created April 4, 2017 14:38 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
1 {
1: "\000\203\003\276\260\227\301\264\r+\030c\262\336\204\2006\323B@I\346b V\001\037\333\030^m\326\353\001\005\250k\221\\\203\262\362D_\273\201\215\301\377_\366\301\233\377\256I\343\221p\363^\332\234\306h\206\225}x\242h\310\244\217\020\342\366J\375d\211\312\225MgS}\220\225\026$m[\353O\177\027\326f.\311\333t\032\016-\322\010E\2251B\037\323\301\314P\335\325\206]\324\1770\373\316\316\204\3059JYDm\202f\267\332\341\224w\230\265\006r\330\241<\24527\221\336\3626\017\336tr\035\275\200f\245\360Gm\247\216\005\246\366\317w<\364c\n\205\007\304a6\317\367C\2148\362\241\340\307#K\305\254?!$\302\340)G\354\236Eg\360\361\234\004\273r\177\244\'\376\365\325s\310\331\n\311\302\371)\366\313\377\304i\"\206}\227\246.OF\337z8\2316\243\037\252%\251\276\251YU\351\227\025\005\303\216\330\'\312X^V\326\314\342\323\016\037\336\366\'#)\271l\256\371-i\210?-uz\0007T\241\362H\236e\031\244\004\365\010YV\342aGU\325o\370\266\373`G-\330\014U:\307\330\344eT\355\321j\rB~\320%en\213\265m+\336\344\330\215~\252\030\352\255O\354\250\361\207\016@\01
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@minimedj
minimedj / gist:cd85641cd7f7af1fd250
Created March 8, 2016 11:00 — forked from gerjantd/gist:9787489
Bash/nc: netcat as a simple telnet server
CLIENT/SERVER MODEL
It is quite simple to build a very basic client/server model using nc. On one console, start nc listening on a specific port for a connection. For example:
$ nc -l 1234
nc is now listening on port 1234 for a connection. On a second console (or a second machine), connect to the machine and port being listened on:
$ nc 127.0.0.1 1234
There should now be a connection between the ports. Anything typed at the second console will be concatenated to the first, and vice-versa. After the connection has been set up, nc does not really care which side is being used as a ‘server’ and which
@minimedj
minimedj / web-servers.md
Created January 27, 2016 14:05 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000