Skip to content

Instantly share code, notes, and snippets.

View tomedme's full-sized avatar

Tom Edme tomedme

  • France
View GitHub Profile
@tomedme
tomedme / gist:b537dcc3f1c43081b8da408f5c6c02ab
Created October 22, 2021 00:33
VisualStudio Code Java runtimes
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "C:\\Java\\jdk1.8.0_302"
},
{
"name": "JavaSE-11",
"path": "C:\\Java\\jdk11.0.12_7",

how to use:

make && make fontsave

FONT_DIR ?= ./fontello

Don't edit below

FONTELLO_HOST ?= https://fontello.com

@tomedme
tomedme / README.md
Created July 20, 2021 01:52 — forked from jamesramsay/README.md
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
In case you're interested by making you're constructor more dry you could also use the ES6 fat arrow syntax.
constructor(props) {
super(props);
}
handleScroll = (event) => {
console.log('the scroll things', event)
};
Fat arrow automatically bind this to the method, allowing shorter constructor. Especially when you have a lot of methods.
find $BACKUP_DIR -ctime +30 -exec rm -f {} \;
@tomedme
tomedme / gist:e30f6174cac885acf6d2e96eda76d5c4
Created December 22, 2020 01:35
How do I authenticate with the V2 API?
The following example script demonstrates authentication with the new V2 API.
Notes:
jq required
Need to set user/pass
#!/bin/bash
set -e
#!/bin/sh
# From: https://tech.labelleassiette.com/how-to-reduce-the-memory-usage-of-mysql-61ea7d1a9bd
# you might want to add some user authentication here
mysql -e "show variables; show status" | awk '
{
VAR[$1]=$2
}
END {
USAGE: gradle [option...] [task...]
-?, -h, --help Shows this help message.
-a, --no-rebuild Do not rebuild project dependencies.
-b, --build-file Specify the build file.
--build-cache Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds.
-c, --settings-file Specify the settings file.
--configuration-cache Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds. [incubating]
--configuration-cache-problems Configures how the configuration cache handles problems (fail or warn). Defaults to fail. [incubating]
--configure-on-demand Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. [incubating]
###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/jwt_rsa_256.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/jwt_rsa_256.pub.pem
JWT_PASSPHRASE=94af4a52-08fc-11eb-adc1-0242ac120002
###< lexik/jwt-authentication-bundle ###
@tomedme
tomedme / Base62.java
Created November 22, 2019 01:12 — forked from subchen/Base62.java
Base62 for java
public class Base62 {
private static final char[] digitsChar = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
private static final int BASE = digitsChar.length;
private static final int FAST_SIZE = 'z';
private static final int[] digitsIndex = new int[FAST_SIZE + 1];
static {
for (int i = 0; i < FAST_SIZE; i++) {