Skip to content

Instantly share code, notes, and snippets.

View doppelganger9's full-sized avatar
💭
Now on Github even during my work day, but with another name.

David Lacourt doppelganger9

💭
Now on Github even during my work day, but with another name.
View GitHub Profile
@doppelganger9
doppelganger9 / App.svelte
Created May 28, 2019 17:22
Sliding Svelte Menu with animation
<script>
import { writable } from 'svelte/store';
import { tweened } from 'svelte/motion';
import { cubicOut } from 'svelte/easing';
const menuOpened = writable(false);
const menuLeft = tweened(-30, {
duration: 200,
easing: cubicOut,
});
@doppelganger9
doppelganger9 / my-languages-since-1978.csv
Last active September 8, 2022 07:26
Yearly percentages of programming languages importance since I began programming.
year BASIC Pascal C/C++ X86 Assembly Java Objective C Bash Groovy JavaScript TypeScript TOTAL (100)
1988 100 100
1989 100 100
1990 100 100
1991 100 100
1992 100 100
1993 100 100
1994 100 100
1995 100 100
1996 90 5 5 100
@doppelganger9
doppelganger9 / fix-dialogflow-alexa-export.js
Created March 31, 2018 21:40
NodeJS Script to convert DialogFlow exported project for Alexa to new Alexa Skill Kit Interaction model schema.
import * as fs from 'fs';
/**
* put your Exported to Alexa DialogFlow project in the `alexa-export` directory
* run this script, it will generate an IntentSchemaV2.json that should pass the new
* Alexa Skill Kit schema definition validations.
* This is based on my project, it is by no means exhaustive, feel free to fork and
* add what you need.
*/
@doppelganger9
doppelganger9 / add-android-sdk-licenses.sh
Last active November 9, 2021 19:36
This script adds android licenses hash to be able to update/install sdk package on the command line (android / sdkmanager tools) without having to manually input 'y' to accept the license terms. Credits to http://stackoverflow.com/a/38381577/526660
#!/usr/bin/env bash
#
# This script adds android licenses hash to be able to update/install sdk package on the
# command line (android / sdkmanager tools) without having to manually input 'y' to accept the
# license terms.
#
# Prerequisite: ANDROID_HOME env var must be set.
#
# Tested on MacOS 10.12.3
#
#define MAXIMUM_IMAGE_WEIGHT 1024*1024
- (UIImage *)compressImage:(UIImage *)image {
float actualHeight = image.size.height;
float actualWidth = image.size.width;
float maxHeight = 600.0;
float maxWidth = 800.0;
float imgRatio = actualWidth/actualHeight;
float maxRatio = maxWidth/maxHeight;
#!/bin/bash
# usage :
# generate-iOS-app-icons.sh someDir/sourceImage-1024x1024.png path/where/ImagesAssets/is/located
mkdir -p generated
# you'll have to delete this one after executing the script if you copy the generated images in the Images asset
SOURCE_ICON="$1"
PATH_TO_IMAGES_ASSET="$2"