This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple Javascript function that linkifies a tweet object's text based on that tweet's entities. | |
* | |
* More info about Tweet Entities: https://dev.twitter.com/docs/tweet-entities . | |
* | |
* NOTE: You may need to add "include_entities=1" or "include_entities=true" to your API request. | |
*/ | |
function linkifyTweet(tweet){ | |
if(!tweet.entities){ | |
return tweet.text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name KickAssTorrents LinkFixer | |
// @namespace KATLinkFixer | |
// @description Disables the confirmation dialogs/pages that links in the description block of KAT torrents show when clicked. | |
// @include /^(http|https)://kat\.ph/[a-zA-Z0-9-]+\.html$/ | |
// @version 1.0.3 | |
// @grant none | |
// @updateURL https://gist.github.com/kalmanolah/5067676/raw/KickAssTorrents_LinkFixer.user.js | |
// ==/UserScript== | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Cloud to Butt | |
// @namespace cloudtobutt | |
// @description Replaces instances of "(The) Cloud" with "(My) Butt". Ported from and Inspired by panicsteve's cloud-to-butt extension for Google Chrome, and DaveRandom's ports thereof. | |
// @include * | |
// @version 1.0.1 | |
// @grant none | |
// @updateURL https://gist.github.com/kalmanolah/5764435/raw/cloudtobutt.user.js | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace KalmanOlah\ExampleBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Yaml\Parser; | |
use Symfony\Component\Yaml\Dumper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A Symfony2 service for fetching all of a Github user's gists. | |
* Gist content for the 10 latest gists is downloaded, and Github API responses are cached using APC. | |
* The APC extension for PHP needs to be enabled. | |
* | |
* In order to use this Service, you should add the following services to Symfony2: | |
* | |
* services: | |
* cache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# @python3 | |
# @author Kalman Olah <[email protected]> | |
"""A hastebin CLI tool.""" | |
import click | |
import json | |
import requests | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This goes in your services.yml: | |
* | |
* services: | |
* example.twig.gravatar_extension: | |
* class: My\ExampleBundle\Twig\GravatarExtension | |
* tags: | |
* - { name: twig.extension } | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"9420":"Aaigem","8511":"Aalbeke","9300":"Aalst","3800":"Aalst (Limb.)","9880":"Aalter","3200":"Aarschot","8700":"Aarsele","8211":"Aartrijke","2630":"Aartselaar","4557":"Abée","4280":"Abolens","3930":"Achel","5590":"Achêne","5362":"Achet","4219":"Acosse","6280":"Acoz","9991":"Adegem","8660":"Adinkerke","1790":"Affligem","9051":"Afsnee","5544":"Agimont","4317":"Aineffe","5310":"Aische-en-Refail","6250":"Aiseau","6250":"Aiseau-Presles","5070":"Aisemont","3570":"Alken","5550":"Alle","4432":"Alleur","1652":"Alsemberg","8690":"Alveringem","4540":"Amay","6680":"Amberloup","4770":"Amblève","6953":"Ambly","4219":"Ambresin","4770":"Amel","6997":"Amonines","7750":"Amougies","4540":"Ampsin","5300":"Andenne","1070":"Anderlecht","6150":"Anderlues","4821":"Andrimont","4031":"Angleur","7387":"Angre","7387":"Angreau","5537":"Anhée","6721":"Anlier","6890":"Anloy","5537":"Annevoie-Rouillon","4430":"Ans","5500":"Anseremme","7750":"Anseroeul","5520":"Anthée","4520":"Antheit","4160":"Anthisnes","7640":"Antoing","2000":"Antwerpen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Redmine Improvements | |
// @namespace kalmanolah_redmine_improvements | |
// @description Improvements for Redmine. | |
// @include https://your.redmine.instance/* | |
// @version 1.0.0 | |
// @grant none | |
// @updateUrl https://gist.github.com/kalmanolah/6621123/raw/kalmanolah_redmine_improvements.user.js | |
// @run-at document-end | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Your\ExampleBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | |
/** | |
* @ORM\Entity | |
* @UniqueEntity("name") | |
*/ |
OlderNewer