Skip to content

Instantly share code, notes, and snippets.

@prochor666
prochor666 / media.js
Last active December 24, 2015 15:59
Autoloader
autoLoader : function(){
if($('video').length > 0)
{
$('video').each( function(index)
{
var videoParent = $(this).parent();
var videoSource = $(this).attr('src');
var videoWidth = $(this).attr('width');
@prochor666
prochor666 / cut.everything.php
Last active August 29, 2015 14:07
Cut string, reflect words delimited by space, cuts some ugly chars from the end
<?php
/**
* Cut string, reflect words delimited by space, cuts some ugly chars from the end
* @param string $str
* @param int $length
* @return string
*/
function cutStr($str, $length = 255, $suffix = NULL){
// printable, formal, to samy co nad tim, jen jinak psany
<?php namespace Fishcat\Shop\Models\Traits;
use Input;
trait TreeStructure {
public static $repository = false;
/**
* Get nested array of queried entry type
@prochor666
prochor666 / flags.css
Created November 28, 2014 11:58
Vlajky v CSS (SVG)
This file has been truncated, but you can view the full file.
.flag-box {
width: 30px;
height: 30px;
display: inline-block;
vertical-align: middle;
position: relative;
}
.flag-box .flag {
display: inline-block;
@prochor666
prochor666 / config.json
Created December 4, 2014 11:29
OpenNX Bootstrap config.json
{
"vars": {
"@gray-base": "#666",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#67C8FF, 6.5%)",
"@brand-success": "#00cc00",
@prochor666
prochor666 / phpdoc.param.fix.php
Created December 16, 2014 11:23
phpdocumentor 2.8.* + @param fix
<?php
namespace phpDocumentor\Plugin\Core\Descriptor\Validator;
/**
*
* @property \phpDocumentor\Descriptor\ArgumentDescriptor $argument
* @property \phpDocumentor\Descriptor\Tag\ParamDescriptor $parameter
* @property \phpDocumentor\Descriptor\Collection $parameters
* @property string $fqsen
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pexpect
import json
import time
import os
from sys import argv
class Mounter:
@prochor666
prochor666 / config.json
Last active August 29, 2015 14:21
Warp backend 3.3.5
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#0c9191",
"@brand-success": "#36CC36",
@prochor666
prochor666 / install.sh
Last active April 18, 2022 03:34
Create & run python/wsgi app on Ispconfig 3 / Debian
#!/bin/bash
# place thi s file into the web dir
# install Flask foundation + dependencies
cd ..
git clone https://github.com/JackStouffer/Flask-Foundation.git web
cd web
make deps
wget https://gist.github.com/prochor666/a367a9ebd7cf67f04668/raw/6516a8dd3c90c808c5f2c81f67481a4fd48126f6/manage.wsgi
@prochor666
prochor666 / update-curl-cert.sh
Created June 18, 2015 11:45
Solving Composer download problem with SSL, CURL has expired certificate
#!/bin/bash
# Tested on Debian Wheezy 7.1
wget http://curl.haxx.se/ca/cacert.pem
cp cacert.pem /etc/ssl/cert/cacert.pem
update-ca-certificates -f