Skip to content

Instantly share code, notes, and snippets.

View ozh's full-sized avatar
🍷
More wine, please.

྅༻ Ǭɀħ ༄༆ཉ ozh

🍷
More wine, please.
View GitHub Profile
@ozh
ozh / import.md
Created May 22, 2020 12:09
import DB with MySQL in XAMP
  • create DB (eg yourls_ozhin)
  • in CMD.exe (not the bash shell) :
d:\online\xampp7\mysql\bin\mysql.exe -u root -p yourls_ozhin < path/to/ozh_ozhin.sql
@ozh
ozh / push_on_someone_pull_request.md
Last active February 12, 2023 11:00
push on someone's pull request

Pull request from THEM to my REPO :

$ git checkout -b THEM-patch-1 master
$ git pull https://github.com/THEM/REPO.git patch-1
$ git commit --allow-empty -m "Trigger build"
$ git push https://github.com/THEM/REPO.git THEM-patch-1:patch-1
@ozh
ozh / markdown_image_border.md
Created May 14, 2020 16:30
Image border in markdown

Image in markdown: no style possible

![alt-text](https://raw.githubusercontent.com/YOURLS/YOURLS/1.7.9/images/yourls-logo.png)

alt-text

IMG tag accepts no style

<img src="https://raw.githubusercontent.com/YOURLS/YOURLS/1.7.9/images/yourls-logo.png" border="1px solid red"/>

<?php
/**
* YOURLS modification of a other functions from WordPress' KSES implementation.
* Not used in core, provided if any plugin or future feature needs anything from here
*
* NOTE: NOT TESTED. MAY OR MAY NOT PRODUCE EXPECTED RESULTS. SOME FUNCTIONS
* MAY BE STILL TIED TO WORDPRESS.
*
* NOTE: THIS FILE IS NOT INCLUDED BY DEFAULT. MANUALLY INCLUDE IT IF NEEDED.
*
@ozh
ozh / git-clone-into-not-empty-dir.md
Last active September 7, 2021 13:56 — forked from davisford/gist:5039064
git clone into non-empty directory

You have a folder with files

$ mkdir -p ~/foo && cd ~/foo
$ touch NEWFILE

You cannot git clone into it because the directory is not empty. To do so:

@ozh
ozh / article.md
Created April 19, 2020 09:23
YOURLS article about

little known features

  • custom favicon in /user
  • pages
  • maintenance page

plugin of the week

@ozh
ozh / README.md
Created April 16, 2020 14:46
YOURLS: Old Pages (backward compatibility plugin for pages directory in root)

Plugin for YOURLS 1.7.7+: Old Pages

What for

Display pages that are located in <root>/pages/ instead of <root>/user/pages/

How to

  • In /user/plugins, create a new folder named old-pages
  • Drop these files in that directory
@ozh
ozh / notepad++plugins.md
Created April 14, 2020 19:12
Notepad++ plugins
@ozh
ozh / hooklist.pl
Created April 8, 2020 09:28
Perl script to generate hook list in YOURLS
#! /usr/bin/perl
use File::Find;
my $dir = '.';
my %actions;
my %filters;
$dir = $ARGV[0] if ($#ARGV != -1);
@ozh
ozh / readme.md
Created April 2, 2020 09:15
PHP timezone dropdown

Drop down of all timezones, grouped by Region, + a list of manual UTC offsets