Skip to content

Instantly share code, notes, and snippets.

View Lucas-C's full-sized avatar

Lucas Cimon Lucas-C

View GitHub Profile
@alexanderilyin
alexanderilyin / README.md
Created November 15, 2018 00:58
Auto-increment Minor Semantic Version using Docker Hub API v2

For example your latest image with semantic versioning looks like this:

${DOCKER_HUB_ORG}/${DOCKER_HUB_REPO}:v1.20.0

Example provided above will do the folowing:

  1. Generate token using your github username and password.
  2. Get list of all tags from repository.
@tarciozemel
tarciozemel / slugify.js
Created January 22, 2018 17:17 — forked from eek/slugify.js
Vanilla JavaScript Slugify + Accent removal - Just another JavaScript Slugifier with an extra line for Accent Removal
function slugify(text) {
return text.toString().toLowerCase().trim()
.normalize('NFD') // separate accent from letter
.replace(/[\u0300-\u036f]/g, '') // remove all separated accents
.replace(/\s+/g, '-') // replace spaces with -
.replace(/&/g, '-and-') // replace & with 'and'
.replace(/[^\w\-]+/g, '') // remove all non-word chars
.replace(/\-\-+/g, '-') // replace multiple '-' with single '-'
}
@westberliner
westberliner / Dockerfile owncloud:latest
Last active January 28, 2023 13:41
Add ldap php extension to official owncloud docker container.
FROM owncloud:latest
RUN \
apt-get update && \
apt-get install libldap2-dev -y && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap
# LibreOffice macro script
import uno
def changeFontsWithin(object_list, to_font, to_weight=None):
for i in range(object_list.getCount()):
shape = object_list.getByIndex(i)
the_type = shape.getShapeType()
assert(shape.supportsService(the_type))
if shape.supportsService('com.sun.star.drawing.TextProperties'):
if to_font:
@ArtemAvramenko
ArtemAvramenko / TypeScript_dark.xml
Last active August 10, 2023 11:51
TypeScript for Notepad++ (dark theme)
<NotepadPlus>
<UserLang name="TypeScript" ext="ts" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@brechtm
brechtm / exporteps.py
Last active November 21, 2022 23:55
Libre/OpenOffice Draw script to bulk export figures
# Libre/OpenOffice: Export selected or all figures as EPS
# 2010 Brecht Machiels
#
# Usage:
# - drop script in user scripts folder
# Max OSX: $HOME/Library/Application Support/LibreOffice/4/user/scripts/python/
# (Arch) Linux: $HOME/.config/libreoffice/4/user/Scripts/python/
# other Linux: $HOME/.libreoffice/4/user/Scripts/python/
# Windows: C:\Document and Settings\<username>\Application Data\libreoffice\4\user\Scripts\python
# - start Draw and draw some figures
@zach-klippenstein
zach-klippenstein / ChangePassword.java
Last active June 23, 2024 19:01
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall ([email protected]), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{