Skip to content

Instantly share code, notes, and snippets.

Johannes Berdin johannesberdin

View GitHub Profile
@johannesberdin
johannesberdin / jigsaw-gh-workflow.yml
Created May 5, 2020
Jigsaw auto deployment to GitHub Pages
View jigsaw-gh-workflow.yml
name: Auto-deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
View pre-commit
#!/bin/sh
LIST=$(git diff --name-only --diff-filter=AM HEAD)
for file in $LIST
do
if [ "$file" == '#' ]; then
continue
fi
EXTENSION=$(echo "$file" | grep ".spp$")
View color-blind-simulation.js
var blinder = require('color-blind');
var colorBlindWatch = $('.color-blind-watch');
var colorBlindResult = $('.color-blind-result-watch');
var randomColor = '#000000';
window.setInterval(function(){
randomColor = '#'+ ('000000' + Math.floor(Math.random()*16777215).toString(16)).slice(-6);
colorBlindFn(randomColor);
}, 1000);
View random-color.js
var color '#'+ ('000000' + Math.floor(Math.random()*16777215).toString(16)).slice(-6);
View souyuz.rb
module Fastlane
module Actions
class SouyuzAction < Action
def self.run(params)
require 'souyuz'
absolute_app_path = File.expand_path(Souyuz::Manager.new.work(params))
if absolute_app_path.include?(".ipa")
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_app_path
ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_app_path
View test.sh
#!/bin/sh
# Arguments
MYSQL_PASSWORD=${1}
SERVER_NAME=${2}
SERVER_ALIAS=${3}
SERVER_ADMIN=${4}
MAIL_ADDRESS=${5}
MAIL_DOMAIN=${6}
MAIL_REPLY_PREFIX=${7}
@johannesberdin
johannesberdin / Vagrantfile
Created Jan 4, 2016
Default Vagrantfile for my Vagrant lamp stack
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.ssh.forward_agent = true
config.vm.network :private_network, ip: "10.0.0.10"
@johannesberdin
johannesberdin / vagrant.sh
Last active Jan 4, 2016
Provision shell script for my Vagrant lamp stack
View vagrant.sh
#!/bin/sh
# vagrant shell script for simple lamp stack
export DEBIAN_FRONTEND=noninteractive
# update
apt-get -qq update
echo "Updated system."
# php55 repository
apt-get -qq -y install python-software-properties
@johannesberdin
johannesberdin / php.ini
Created Jan 3, 2016
Default PHP.ini for my Vagrant lamp stack
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@johannesberdin
johannesberdin / 000-default.conf
Created Jan 3, 2016
Default Apache2 configuration for my Vagrant lamp stack
View 000-default.conf
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
You can’t perform that action at this time.