Skip to content

Instantly share code, notes, and snippets.

@Rebolon
Rebolon / vue.debug.js
Created November 5, 2016 20:50
A solution to use debugger in v-for for VueJS
<ul id="pages-block">
<li v-for="page in pages">
<a v-bind:href="page.url">{{page.name}}</a>
<debug :item="page"/>
</li>
</ul>
...
Vue.component('debug', {
<?php
namespace Payum\SiteBundle\Command;
use Payum\SiteBundle\Model\Library;
use Payum\SiteBundle\Service\LibraryRegistry;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
@ubermuda
ubermuda / .stage1.yml
Last active August 29, 2015 14:04
Examples of using NPM in a http://stage1.io build
build:
- apt-get update -y
- apt-get install -y software-properties-common python-software-properties python g++ make
- apt-add-repository ppa:chris-lea/node.js
- apt-get update -y
- apt-get install -y nodejs
- npm install -g bower
- bower install --allow-root
- composer install --ansi --no-progress --dev --prefer-dist --no-interaction
- app/console doctrine:schema:update --force
@vonglasow
vonglasow / pomo.pl
Last active August 29, 2015 14:03
Get redmine issues title for pomojs
#!/usr/bin/perl
use strict;
use warnings;
use Carp;
use WWW::Mechanize;
use Mojo::DOM;
use String::ShellQuote;
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@hggh
hggh / graylog2.md
Last active January 6, 2023 12:18
Graylog2 Debian Packages

WARNING

These packages are obsolete! Please use the official packages from http://www.Graylog2.org

=================================================

@danvbe
danvbe / 1-Explanations.md
Last active April 21, 2023 15:39
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@fairchild
fairchild / logstash_indexer.conf
Created July 2, 2012 01:53
Logstash config example
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
message_format => "json_event"
}
@real34
real34 / APC-Recipe.rb
Created June 22, 2012 13:26
Capistrano : APC recipe to deal with Apache APC cache
##
# APC recipe
# => convenience rules for dealing with APC in applications
##
_cset(:apc_webroot) { "" }
namespace :apc do
desc <<-DESC
Create a temporary PHP file to clear APC cache, call it (using curl) and removes it