Skip to content

Instantly share code, notes, and snippets.

💭
Not on Github during my work day, I promise, boss.

David Lacourt doppelganger9

💭
Not on Github during my work day, I promise, boss.
Block or report user

Report or block doppelganger9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@doppelganger9
doppelganger9 / App.svelte
Created May 28, 2019
Sliding Svelte Menu with animation
View App.svelte
<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 Mar 17, 2019
Yearly percentages of programming languages importance since I began programming.
View my-languages-since-1978.csv
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 Mar 31, 2018
NodeJS Script to convert DialogFlow exported project for Alexa to new Alexa Skill Kit Interaction model schema.
View fix-dialogflow-alexa-export.js
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 Mar 16, 2017
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
View add-android-sdk-licenses.sh
#!/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
#
View whatsapp-image-compression
#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;
View generate-iOS-app-icons.sh
#!/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"
You can’t perform that action at this time.