Skip to content

Instantly share code, notes, and snippets.

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@pmurzakov
pmurzakov / Badoo PHP Russia 2019 talk.md
Last active September 10, 2021 22:01
Badoo PHP performance -- useful links and snippets -- PHP Russia 2019 talk
@maxvt
maxvt / infra-secret-management-overview.md
Last active July 5, 2024 13:01
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@akre54
akre54 / backbone.fetch.js
Last active November 22, 2023 19:10
Backbone.ajax with window.fetch
var defaults = function(obj, source) {
for (var prop in source) {
if (obj[prop] === undefined) obj[prop] = source[prop];
}
return obj;
}
var stringifyGETParams = function(url, data) {
var query = '';
for (var key in data) {
@rrosiek
rrosiek / install_mysql.sh
Last active June 5, 2023 07:08
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@frastel
frastel / build-lock.xml
Created February 20, 2013 09:42
Ant target for executing composer.lock vulnerability check provided by SensioLabs https://security.sensiolabs.org without using the CLI command. The command "ant lock_check" will do everything you need for this check. The definition assumes existing folder structure from http://jenkins-php.org/, you may want to modify those paths.
<?xml version="1.0" encoding="UTF-8"?>
<project name="Project-name-here" default="build" basedir=".">
<target name="lock_check" description="Checks for vulnerabilities through a SensioLabs web service"
depends="lock_reset,lock_get,lock_show">
<local name="vulnerabilities.clean"/>
<loadfile property="vulnerabilities.clean"
srcfile="${basedir}/build/logs/check_lock.log">
<filterchain>
@mxriverlynn
mxriverlynn / marionette.gauntlet.js
Last active September 25, 2018 18:13
Marionette.Gauntlet - an event based "state machine" of sorts, used for building wizard, breadcrumb and tab UI and navigation systems
// Marionette.Gauntlet v0.0.0
// --------------------------
//
// Build wizard-style workflows with an event-emitting state machine
// Requires Backbone.Picky (http://github.com/derickbailey/backbone.picky)
//
// Copyright (C) 2012 Muted Solutions, LLC.
// Distributed under MIT license
Marionette.Gauntlet = (function(Backbone, Picky, Marionette, $, _){
@makasim
makasim / gist:3720535
Last active June 26, 2017 06:32
form partial bind
<?php
namespace Foo\CoreBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormInterface;
/**
* Changes Form->bind() behavior so that it treats not set values as if they