This file contains hidden or 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
require 'sass' | |
module Sass::Script::Functions | |
include Sass::Script::Value::Helpers | |
# returns list of subdirectories to iterate | |
def subdirs(dir) | |
assert_type dir, :String | |
dirs = [] |
This file contains hidden or 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 python | |
import Image | |
import argparse | |
import os | |
def main(filename, width, height, skip_width, skip_height): | |
cur_x = 0 | |
cur_y = 0 |
This file contains hidden or 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
// generate sprite from dir, using specified prefix, base class and styles | |
@mixin spritez($path, $prefix, $base-class) { | |
$sprite-map: sprite-map($path, $layout: smart); | |
$sprite-names: sprite-names($sprite-map); | |
#{$base-class} { | |
background-image: sprite-url($sprite-map); | |
background-repeat: no-repeat; | |
display: inline-block; | |
This file contains hidden or 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
_mergeDefaults = (item, defaultValues...)-> | |
for defaultValue in defaultValues | |
for key, value of defaultValue | |
if not item[key] | |
item[key] = value | |
else if typeof value is 'object' and typeof value.length is 'undefined' | |
item[key] = _mergeDefaults(item[key], value) | |
return item |
This file contains hidden or 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 AppBundle\Form\Handler; | |
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Security\Core\Exception\AuthenticationException; | |
class AuthFailureHandler extends DefaultAuthenticationFailureHandler | |
{ |
This file contains hidden or 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
// Rate of the most right colour. 10 points for green | |
$max_rate: 10; | |
/* | |
Calculate colour between two values. | |
$rate - required position | |
$cmax - maximal value (0-255) | |
$cmin - minimal value (0-255) | |
*/ | |
@function _newval($rate, $cmax, $cmin) { |
This file contains hidden or 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
#!/bin/sh | |
shopt -s extglob | |
mkdir -p resized | |
for file in *.mkv | |
do | |
ffmpeg -i "$file" -vf "ass='${file%.*}.ass'" -c:a copy "resized/$file" | |
done |
This file contains hidden or 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 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | |
[ \ | |
"$(wget -q -O - https://composer.github.io/installer.sig)" \ | |
== "$(php -r "echo hash_file('sha384', 'composer-setup.php');")" \ | |
] && php composer-setup.php --quiet && php composer.phar --version |