Skip to content

Instantly share code, notes, and snippets.


Romans Malinovskis romaninsh

Block or report user

Report or block romaninsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
romaninsh /
Created May 17, 2019
fixes for rstgenerator
#!/usr/bin/env python3
This script converts the doxygen XML output, which contains the API description,
and generates reStructuredText suitable for rendering with the sphinx PHP
from collections import OrderedDict
import xml.etree.ElementTree as ET
import os
View flyout.js
import $ from "jquery";
import debounce from 'debounce';
* Singleton class.
* Flyout needs to be reload to display different
* content. This service will take care of this.
class FlyoutService {
romaninsh / en.php
Last active Oct 23, 2019
File placed in class namespace atk4/data/locale
View en.php
// Automatically generated by for atk4\data (en)
namespace atk4\data\locale;
class En {
const language='en';
const strings=[
'Field requires array for defaults' => 'Field requires array for defaults',
romaninsh / lambda-vpc-internet-access-cloudformation.yml
Last active Oct 4, 2019
CloudFormation template implementing Private network which can be used by Serverless to deploy Lambda into VPCs an maintaining internet access
View lambda-vpc-internet-access-cloudformation.yml
# Add the following to your existing VPC CF stack
# create 2 subnets, lambdas like to be in multiple subnets
Type: AWS::EC2::Subnet
VpcId: !Ref VPC
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: !Ref Private1CIDR
View Volatile.php
namespace saasty\View;
* A very basic view which may contain other elements that are likely to throw exception during render. In which case,
* the exception will be contained within the view and won't break any of the other UI.
class Volatile extends \atk4\ui\View
public $fx = null;
function set($cb = null, $arg2 = null) {
romaninsh / data.sql
Last active May 23, 2019
Illustration to my article on Medium - Admin system with 4 CRUD columns.
View data.sql
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `group` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
/*!40101 SET character_set_client = @saved_cs_client */;
View forgot.php
namespace saasty;
use atk4\ui\Form;
use saasty\Model\User;
require '../vendor/autoload.php';
View gist:d4aace6efbad15f6cdf8b339f91a87e5
in your test.php file:
require '../vendor/autoload.php'; // <-- if file is inside demo, then ../../vendor....
$app = new \saasty\frontend\App('useLayout'=> new \atk4\ui\Layout\Generic([
romaninsh / pugwatch
Created Dec 22, 2016
Watch your .pug and .jade files
View pugwatch
## Save this file into ~/bin and make it writeable (chmod +x pugwatch)
## Execute it from your project folder, e.g. ~/Sites
## It starts up very fast, takes no memory and will instantly compile any
## JADE / PUG files as soon as you create them.
## All dependencies will be installed automatically too.
## Created this because CodeKit (which I purchased) keeps hanging and crashing and being slow for a few years now
romaninsh /
Created May 15, 2018
convert mov into gif
# Don't install or buy crappy gif makers. Here is the magic file:
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
You can’t perform that action at this time.