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
binary = ''.join(['%08d'%int(bin(ord(s))[2:]) for s in ascii_input]) |
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
productToPush = { | |
'name': self.getName(article), | |
'active': True, | |
'tax': 19, | |
'laststock': self.lastStock, | |
'supplier': self.getManufacturerById(article[self.cols.index('lieferantnr')]), | |
'categories': [{'id': categoryId} for categoryId in self.getCategoryMapping(article)], | |
'variants': [ | |
{ | |
'isMain': isMain, |
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 | |
// Add to use-statements | |
use Symfony\Component\HttpFoundation\Response; | |
// [...] Your application code | |
// Action to return XML from Twig-Template | |
$app->get( | |
'/sitemap.xml', | |
function () use ($app) { |
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
/** Decorate required fields **/ | |
$('input[required="required"]').each(function(){ | |
$(this).prev('label').after(' <span class="required">*</span>'); | |
}); |
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
// if you use absolute urls | |
$('a[href="'+window.location+'"]').parent().addClass('active'); | |
// if you use relative urls | |
$('a[href="'+window.location.pathname+'"]').parent().addClass('active'); |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `s_articles`; | |
TRUNCATE TABLE `s_articles_attributes`; | |
TRUNCATE TABLE `s_articles_categories`; | |
TRUNCATE TABLE `s_articles_categories_ro`; | |
TRUNCATE TABLE `s_articles_details`; | |
TRUNCATE TABLE `s_articles_img`; | |
TRUNCATE TABLE `s_articles_prices`; | |
TRUNCATE TABLE s_article_configurator_sets; | |
TRUNCATE TABLE s_article_configurator_set_group_relations; |
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
<!-- Include CSS --> | |
<link href="livecoupon.css" rel="stylesheet"> | |
<!-- Include Javascript --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script> | |
<script src="livecoupon.js"></script> | |
<!-- LiveCoupon begin --> | |
<div id="liveCoupon"> | |
<a href="#your_coupon_link"><img src="example_coupon_image.png" alt="Couponcode XYZ" /></a> |
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
/** | |
* Auto Shorten URLs in a given text-input | |
* @author Fabian Golle <me@fabian-golle.de> | |
**/ | |
jQuery(document).ready(function() { | |
var yourInput = $('#yourInputField'); | |
var yourApiLogin = '__INSERT_YOUR_LOGIN_HERE'; // Get your API Credentials here: | |
var yourApiKey = '_INSERT_YOUR_API_KEY_HERE'; // https://bitly.com/a/settings/advanced | |
yourInput.change(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
#!/usr/bin/env ruby | |
require 'csv' | |
/* SETTINGS */ | |
inputFile = './input.csv' | |
outputFile = './output.csv' | |
separator = ";" | |
/* DONT CHANGE BELOW */ | |
output = File.open(outputFile, 'w') |
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 Acme\CoreBundle\Tests; | |
use Doctrine\ORM\Tools\SchemaTool; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Doctrine\Common\DataFixtures\FixtureInterface; | |
class AppWebTestCase extends WebTestCase | |
{ |
OlderNewer