Skip to content

Instantly share code, notes, and snippets.

View kibao's full-sized avatar

Przemysław Piechota kibao

View GitHub Profile
@cordoval
cordoval / bdd-experiment-guide.md
Created September 9, 2011 16:38 — forked from havvg/bdd-experiment-guide.md
Behavior Driven Development in Symfony2 with Behat, Mink and Zombie.js

Description

This guide will show how to setup a new web application project with:

  • git, a distributed version control system.
  • Symfony2 framework
  • Behat, a tool for behavior driven development.
  • Mink, a tool unifying access to browser emulators wrapping them into one API.
  • Zombie.js, a browser emulator.
  • PHPUnit, the de-facto standard test suite in the PHP world.
@jakzal
jakzal / deploy.rb
Created November 28, 2011 16:11
Updating assets version before assetic dump (capifony)
namespace :symfony do
namespace :assets do
desc "Updates assets version"
task :update_version do
run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml"
end
end
end
before "symfony:assetic:dump" do
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@brtriver
brtriver / BasicAuthControllerProvider.php
Created February 4, 2012 20:36
Simple Basic Auth Controller for Silex.
<?php
namespace Silex\Provider;
use Silex\Application;
use Silex\SilexEvents;
use Silex\ControllerProviderInterface;
use Silex\ControllerCollection;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@Belgand
Belgand / gist:2856947
Created June 2, 2012 06:18 — forked from hileon/gist:1311735
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Ubuntu)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command palette
Ctrl+` python console
Ctrl+N new file

Editing

@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@drymek
drymek / post-checkout
Last active December 25, 2015 01:39
Notification when switching to git branches with different composer.lock source: http://www.markbadolato.com/blog/2013/08/23/notification-when-switchin-git-branches/
#!/bin/bash
# wget https://gist.github.com/drymek/6896918/raw -O /usr/share/git-core/templates/hooks/post-checkout
# chmod +x /usr/share/git-core/templates/hooks/post-checkout
# git init # to reload current git repository
PREV_COMMIT=$1
POST_COMMIT=$2
# MacOS Colors
NOCOLOR='\x1B[0m'
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing