Skip to content

Instantly share code, notes, and snippets.

View skrajewski's full-sized avatar

Szymon Krajewski skrajewski

View GitHub Profile
@skrajewski
skrajewski / Gulpfile.js
Created March 29, 2016 10:14
Gulpfile.js with browserify and external vendor file
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babelify = require('babelify');
var assign = require('lodash.assign');
var gutil = require('gulp-util');
var chalk = require('chalk');
@skrajewski
skrajewski / removeNbps.php
Last active April 9, 2021 11:19
Replace non-breaking spaces with normal spaces
/**
* Replace non-breaking spaces with normal spaces
*
* @param $str
* @return string
*/
public function removeNbsp($str)
{
$str = htmlentities($str);
$str = str_replace(" ", " ", $str);
@skrajewski
skrajewski / resolutions.txt
Created November 22, 2014 08:06
Screen resolutions
1920x1200
1920x1080
1680x1050
1600x900
1440x900
1366x768
1360x768
1280x1024
1280x800
1280x720
@skrajewski
skrajewski / EAN13.php
Created July 29, 2014 07:33
Class EAN13
class EAN13 {
protected $code;
public function __construct($code)
{
if (preg_match("/^[0-9]{12}$/", $code))
{
$this->code = $code . $this->calculateChecksumNumber($code);
}