Skip to content

Instantly share code, notes, and snippets.

View vudaltsov's full-sized avatar
🐘

Valentin Udaltsov vudaltsov

🐘
View GitHub Profile
@maxwellmlin
maxwellmlin / LPX-Trial-Reset.sh
Created April 14, 2021 03:46
Logic Pro X Trial Reset
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash
@ostrolucky
ostrolucky / transcript.txt
Created April 20, 2019 13:47
Using lldb to debug PHP code
Guilhermes-MacBook-Pro:orm guilhermeblanco$ lldb /usr/local/Cellar/php/7.3.2/bin/php
(lldb) target create "/usr/local/Cellar/php/7.3.2/bin/php"
Current executable set to '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64).
(lldb) run ./vendor/bin/phpunit tests/Doctrine/Tests/ORM/Functional/PaginationTest.php --filter testIterateWithOutputWalkersWithRegularJoinWithComplexOrderByReferencingJoined
Process 99416 launched: '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64)
PHPUnit 7.5.6 by Sebastian Bergmann and contributors.
Runtime: PHP 7.3.2 with Xdebug 2.7.0RC2
Configuration: /Users/guilhermeblanco/doctrine/orm/phpunit.xml.dist
@jacekkarczmarczyk
jacekkarczmarczyk / fakeComponents.js
Last active August 13, 2020 01:01
Vuetify fake components 1.4
import Vue from 'vue'
// noinspection JSUnresolvedFunction
Vue.component('v-app', {
props: {
dark: Boolean,
id: String,
light: Boolean
}
})
@fesor
fesor / README.md
Created July 25, 2018 12:28
Symfony without ORM

Удобный менеджмент миграций с Symfony и Doctrine

Мало кто знает, но что бы работал migration:diff вам не нужно ставить ORM.

Что бы это работало объявим простой сервис:

<?php
@aminin
aminin / icu-install.sh
Last active October 11, 2019 15:57
Install ICU from source and build php-intl with the specific version of ICU
#!/usr/bin/env bash
if [[ -x $(which php) ]]; then
PHP_ICU_VERSION=$(php -r 'echo defined("INTL_ICU_VERSION") ? INTL_ICU_VERSION : "none";')
echo "PHP ICU version: $PHP_ICU_VERSION"
else
echo 'WARNING: PHP not installed'
PHP_ICU_VERSION=none
fi
@colophonemes
colophonemes / create_triggers
Last active February 17, 2024 15:15
Postgres TRIGGER to call NOTIFY with a JSON payload
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
'email',
'username'
);
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income
FOR EACH ROW EXECUTE PROCEDURE notify_trigger(
'id',
@pavelbinar
pavelbinar / extract-subtitles-from-mkv.md
Last active December 24, 2023 12:10 — forked from bmaeser/subtitle-extract.txt
Extract subtitles from .mkv files on Mac OS X
// transform cropper dataURI output to a Blob which Dropzone accepts
function dataURItoBlob(dataURI) {
var byteString = atob(dataURI.split(',')[1]);
var ab = new ArrayBuffer(byteString.length);
var ia = new Uint8Array(ab);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ab], { type: 'image/jpeg' });
}
@discordier
discordier / gist:ed4b9cba14652e7212f5
Created December 4, 2014 06:23
options for phpStorm @noinspection annotation
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@johnkary
johnkary / LikeQueryHelpers.php
Last active April 22, 2022 08:09
Proper DQL escaping for LIKE queries with Doctrine 2.
<?php
namespace Foo;
/**
* Methods for safe LIKE querying.
*/
trait LikeQueryHelpers
{
/**