Skip to content

Instantly share code, notes, and snippets.

View frenck's full-sized avatar
🌱
Please, think about the environment 🌎

Franck Nijhof frenck

🌱
Please, think about the environment 🌎
View GitHub Profile
@frenck
frenck / cleanImages.php
Created March 6, 2016 10:00 — forked from peterjaap/cleanImages.php
Script to clean up the images tables in a Magento installation. Removes references to non-existing images, removes duplicate images, sets correct default image and deletes orphaned images from the filesystem.
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.
@frenck
frenck / gist:3c83d64f6819c0a3be116d32f8333f59
Created August 3, 2016 07:33
Install Ruby nokogiri gem on OSX 10.11
gem install nokogiri -- \
--with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 \
--use-system-libraries
@frenck
frenck / keybase.md
Created October 25, 2016 06:31
keybase.md

Keybase proof

I hereby claim:

  • I am frenck on github.
  • I am frenck (https://keybase.io/frenck) on keybase.
  • I have a public key ASATDtNXVY6wperHfHgghkHJwS3NcD1cSdLgNO5dabMhAwo

To claim this, I am signing this object:

@frenck
frenck / dabblet.css
Last active October 18, 2017 12:04 — forked from Potherca/README.md
Badges for Project Stages
/**
* Badges for Project Stages
*
* @see: http://result.dabblet.com/gist/a2ae67caa3863a299ba0
* @see: http://bl.ocks.org/potherca/raw/a2ae67caa3863a299ba0
*/
@import url(https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono);
@import url(https://pother.ca/CssBase/css/base.css);
@import url(https://pother.ca/CssBase/css/created-by-potherca.css);
git clone https://github.com/bigwoof/home-assistant.github.io.git bigwoof
cd bigwoof
git remote add upstream git@github.com:home-assistant/home-assistant.github.io.git
git fetch upstream
git checkout next
git pull upstream next
git checkout patch-4
git rebase --onto next patch-4~1
git push -f
---
image: docker:latest
variables:
ADDON_GITHUB_REPO: frenck/addon-example
ADDON_SLUG: example
ADDON_TARGET: example
DOCKER_DRIVER: overlay2
DOCKER_HUB_ORG: frenck
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}
from ctypes import c_ushort
class CRC16(object):
crc16_tab = []
# The CRC's are computed using polynomials. Here is the most used
# coefficient for CRC16
crc16_constant = 0xA001 # 40961
#!/usr/bin/env bash
###########################################################
###########################################################
## ##
## THIS SCRIPT SHOULD ONLY BE RUN ON GENERIC LINUX ##
## ##
###########################################################
###########################################################
set -o errexit # Exit script when a command exits with non-zero status
set -o errtrace # Exit on error inside any functions or sub-shells
@frenck
frenck / .zshrc
Created December 11, 2018 21:05
My ZSH config
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$(brew --prefix coreutils)/libexec/gnubin:$PATH
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Path to your oh-my-zsh installation.
export ZSH="/Users/frenck/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME