Skip to content

Instantly share code, notes, and snippets.

View bserem's full-sized avatar

Bill Seremetis bserem

View GitHub Profile
@bserem
bserem / drupal8_menu_item_clone.sql
Created April 27, 2018 10:34
Clone Drupal 8 menu items to another menu and change their language code.
INSERT INTO menu_link_content_data
(
id,
bundle,
langcode,
title,
description,
menu_name,
link__uri,
link__title,
@bserem
bserem / redirect_importer.sh
Last active March 8, 2018 14:15
Mass import redirects in Drupal 8 from CSV
#!/bin/bash
i=0
cat redir.csv| while read line
do
let "i++"
rsource=`echo $line | cut -d ',' -f1`
rtarget=`echo $line | cut -d ',' -f2`
redirect='use Drupal\redirect\Entity\Redirect;Redirect::create(["redirect_source" => "'$rsource
if [[ $rtarget = *"http"* ]]; then
@bserem
bserem / Gulpfile.js
Created July 21, 2016 09:15
Super-gulp for drupal (but not just drupal) theming.
var gulp = require('gulp');
del = require('del');
stripDebug = require('gulp-strip-debug');
gulpIgnore = require('gulp-ignore');
plumber = require('gulp-plumber'); //error handling
replace = require('gulp-replace'); //replace text
livereload = require('gulp-livereload'); // push css changes to browser
autoprefixer = require('gulp-autoprefixer'); // vendor-prefix css
sass = require('gulp-sass'); //libsass
sourcemaps = require('gulp-sourcemaps'); // sourcemaps for SASS->CSS
@bserem
bserem / LCDd.conf
Created June 17, 2017 05:38
HD44780 LibreElec 8 (.kodi/userdata/addon_data/service.lcdd/LCDd.conf)
# LCDd.conf -- configuration file for the LCDproc server daemon LCDd
#
# This file contains the configuration for the LCDd server.
#
# The format is ini-file-like. It is divided into sections that start at
# markers that look like [section]. Comments are all line-based comments,
# and are lines that start with '#' or ';'.
#
# The server has a 'central' section named [server]. For the menu there is
# a section called [menu]. Further each driver has a section which
@bserem
bserem / Android Privacy Policy Template
Created December 8, 2017 16:32 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
-- this is an example
group: ask4
katalima = {
kodikosK:number, onomaK:string, addressK:string, city:string
1, 'Lato', 'Kapou 5', 'Patra'
2, 'Menexes', 'Kapoy allou 4', 'Patra'
}
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# Set Ctrl-a as control instead of ctrl-b
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Nested Multiplexers
bind-key a send-prefix
# Switch to last window with two C-a
bind-key C-a last-window
@bserem
bserem / .screenrc
Last active January 3, 2016 08:29
GNU Screen configuration file
startup_message off
vbell off
defscrollback 5000
#change the hardstatus settings to give an window list at the bottom of the
#screen, with the time and date and with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%{r}%H %{g}][%= %{= kw}%?%-Lw%?%{+b m}(%{W}%n*%f%t%?(%u)%?%{m})%{-b w}%?%+Lw%?%?%= %{g}][%{g} %Y/%m/%d %{c}%c:%s %{g}]'
#change names and add screens as you wish
@bserem
bserem / tacit.pde
Created November 1, 2012 19:39 — forked from Grathio/tacit.pde
Project Tacit
// Tacit, Wrist mounted tactile feedback for the blind.
// By Steve Hoefer at Grathio Labs (http://grathio.com)
// Version 12.02.04
//
// Copyright (c) 2012 Steve Hoefer
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions: