Skip to content

Instantly share code, notes, and snippets.

View a-menshchikov's full-sized avatar
🤔

Alexander Menshchikov a-menshchikov

🤔
View GitHub Profile
@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@adityamenon
adityamenon / app.domainname
Last active December 28, 2021 06:31
My preferred configuration for a Laravel 4 API endpoint running over PHP-FPM, when I need to talk to it with AngularJS.
server {
root /path/to/app/public;
index index.php;
server_name test.dev;
set $cors_headers "whatever-custom-headers,you-would-like";
# redirection to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
@ssebastianj
ssebastianj / bindkey.md
Last active December 26, 2023 06:34
zsh bindkey commands
Shortcut Action
CTRL+@ set-mark-command
CTRL+A beginning-of-line
CTRL+B backward-char
CTRL+D delete-char-or-list
CTRL+E end-of-line
CTRL+F forward-char
CTRL+G send-break
CTRL+H backward-delete-char
@fesor
fesor / ContainerReturnTypePlugin.php
Last active July 28, 2022 13:50
Phan plugins for Symfony and Doctrine
<?php
use Phan\CodeBase;
use Phan\Language\Context;
use Phan\Language\UnionType;
use Phan\PluginV2\ReturnTypeOverrideCapability;
use Phan\Language\Element\Method;
use Phan\PluginV2;
use \Phan\Language\FQSEN\FullyQualifiedClassName;
use Phan\Language\Element\Clazz;
@dsample
dsample / README.md
Last active July 26, 2024 02:46
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
@ubergesundheit
ubergesundheit / readme.md
Last active June 24, 2024 06:57
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@Tamal
Tamal / git-ssh-error-fix.sh
Last active July 26, 2024 12:02
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
<?php
declare(strict_types=1);
/**
* Computes the difference between two dates in milliseconds.
*
* @psalm-pure
*
* @return int $a - $b