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
#!/bin/bash | |
src_dir=`pwd` | |
mkdir "done" | |
for f in *.jar | |
do | |
mkdir -p "${f}_extracted" | |
unzip $f -d "${f}_extracted" |
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 | |
echo '<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">'; | |
echo '<div class="container" style="margin-top:50px;">'; | |
if (!class_exists('ZipArchive')) { | |
die("<h1>ZipArchive is not installed. Pleas echeck php.ini</h1>"); | |
} |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 10 columns, instead of 9 in line 2.
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
Ländercode,Bundesstaaten-Code,PLZ (Postleitzahl),Stadt,Steuersatz %,Steuername,Priorität,Zusammengesetzt,Versand,Steuerklasse | |
DE,*,*,*,19.0000,Mwst.,1,0,1, | |
AT,*,*,*,20.0000, Mwst.,1,0,1 | |
BE,*,*,*,21.0000, Mwst.,1,0,1 | |
BG,*,*,*,20.0000, Mwst.,1,0,1 | |
HR,*,*,*,25.0000, Mwst.,1,0,1 | |
CY,*,*,*,19.0000, Mwst.,1,0,1 | |
CZ,*,*,*,21.0000, Mwst.,1,0,1 | |
DK,*,*,*,25.0000, Mwst.,1,0,1 | |
EE,*,*,*,20.0000, Mwst.,1,0,1 |
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
<? | |
// Usage in Controller Actions: | |
$this->addFlash('success', 'Your registration was successful!'); | |
$this->addFlash('warning', 'This email addres is already registered!'); | |
$this->addFlash('danger', 'Your account is currentl locked!'); | |
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_articles_similar_shown_ro`; | |
TRUNCATE TABLE `s_articles_top_seller_ro`; |
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 AppBundle\Validator; | |
use Symfony\Component\Validator\Constraint; | |
class MinChoices extends Constraint | |
{ | |
const TOO_FEW_ERROR = 2; | |
const TOO_MANY_ERROR = 3; |
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
#!/bin/bash | |
if [ "$CODA_SITE_LOCAL_PATH" != "" ]; then | |
cd "$CODA_SITE_LOCAL_PATH" | |
# http://www.westwind.com/reference/os-x/invisibles.html | |
find . -name 'Thumbs.db' -exec rm -rf {} \; # Windows | |
find . -name '.DS_Store' -exec rm -rf {} \; # Mac OSX | |
find . -name '._*' -exec rm -rf {} \; # Mac OSX resource forks | |
find . -name '_notes' -exec rm -rf {} \; # Dreamweaver |
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
/* Copyright 2006-2014 SpringSource. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
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 | |
{ |
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') |
NewerOlder