Skip to content

Instantly share code, notes, and snippets.

View Finesse's full-sized avatar

Sergey M. Finesse

  • Seoul
View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@prog
prog / .gitlab-ci.yml
Created December 14, 2017 07:30
How to use composer (php) including cache with gitlab-ci
build:install-vendor:
stage: build
image: <any-image-with-composer>
before_script:
- composer config -g cache-dir "$(pwd)/.composer-cache"
script:
- composer install --ignore-platform-reqs --no-dev --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .composer-cache/
@palicko
palicko / sticky-footer.css
Created December 14, 2016 20:40
Sticky footer with flexbox (works in IE11)
@kkirsche
kkirsche / aes256-gcm.go
Last active February 23, 2024 14:56
AES-256 GCM Encryption Example in Golang
package example_test
import (
"crypto/aes"
"crypto/cipher"
"hex"
"io"
)
// AES-GCM should be used because the operation is an authenticated encryption
@adikahorvath
adikahorvath / input-decorations.css
Created October 21, 2015 13:57
remove input type="date" arrows
input[type=date]::-webkit-inner-spin-button,
input[type=date]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
@unicornist
unicornist / caretRangeFromPoint.js
Last active August 30, 2023 01:39
Cross browser caretRangeFromPoint
//demo: http://jsfiddle.net/heZ4z/
if (document.addEventListener) { // standard
document.addEventListener('click', function onclick(e) {
var r;
if (document.caretRangeFromPoint) { // standard (WebKit)
r = document.caretRangeFromPoint(e.pageX, e.pageY);
} else if (e.rangeParent) { // Mozilla
r = document.createRange();
@h4cc
h4cc / travis-template-with-hhvm-as-allowed-failure.yml
Last active March 10, 2018 05:01
HHVM Travis-Ci template as allowed failure.
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
matrix:
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@MattKetmo
MattKetmo / FooCommand.php
Created September 7, 2012 11:46
[Console] Write into stdout and stderr
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Testcase: app/console foo > std 2> err
*/