Skip to content

Instantly share code, notes, and snippets.

@rozklad
rozklad / Gitlab Permissions Fix
Last active February 1, 2022 11:30 — forked from leowinterde/Gitlab Permissions Fix
gitlab-ce permissions fix
# Holds repositories directory
sudo chown -R -v git:root /var/opt/gitlab/git-data
sudo chmod -R -v 0700 /var/opt/gitlab/git-data
# Holds git repositories
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories
# Holds large object directories
sudo chown -R -v git:gitlab-www /var/opt/gitlab/gitlab-rails/shared
@rozklad
rozklad / BatchOutline.js
Created August 4, 2019 08:57
Batch Outline stroke all SVG files in folder using Adobe Illustrator
/**
* Batch Outline stroke all SVG files in folder using Adobe Illustrator.
*
* Usage:
* 1) Adjust location and outputLocation variables and save as BatchOutline.js anywhere
* 2) File > Scripts > Other script (CMD + F12) and open BatchOutline.js
*
* @credits https://forums.adobe.com/thread/2395503
* @version 1.1
*/
@rozklad
rozklad / geo.json
Created April 14, 2018 12:52
Complete UN data about immigration, emmigration and demographics including country geometry
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rozklad
rozklad / die_dump.php
Created April 12, 2018 06:23
The one and only Die Dump a.k.a. Dump and Die
<?php
/**
* Die dump
*
* @return void
*/
if (!function_exists('dd'))
{
function dd()
/**
* GetColorStops
*/
function getColorStops(data) {
// Read all relevant values
// and filter those that are not numbers
const results = data.features
.map(element => element.properties && element.properties.total ? element.properties.total[configuration.year] : 0)
.filter(Number);
map.setPaintProperty('countries', 'fill-color', {
property: 'name',
type: 'categorical',
stops: getColorStops(geoData),
default: '#116474',
});
// Wait for load
map.on('load', () => {
axios.get('https://gist.githubusercontent.com/rozklad/49d5ca8a7fbd0173e191820994448690/raw/3c2c1b230b6e32f7fba4848a9fba95465d5d90b1/migration-1990-2017.json')
.then((response) => {
// Store response in geoData
geoData = response.data;
// Base layer with countries data
map.addLayer({
id: 'countries',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
body.login {
div#login {
h1 {
a {
}
}
form#loginform {
p {