Skip to content

Instantly share code, notes, and snippets.

View lukas-h's full-sized avatar
🎯
Focusing

Lukas Himsel lukas-h

🎯
Focusing
  • Nuremberg, Germany
  • 21:33 (UTC +02:00)
View GitHub Profile
@lukas-h
lukas-h / README.md
Last active April 12, 2024 09:37
Discord Motivational Gong Bot (on pull request merge)
  1. Put the gong-bot.yml in the folder .github/workflows in your repository
  2. Add a new webhook in the Discord Server Settings > Integrations > Webhooks
  3. Copy the webhook url
  4. Add the secret DISCORD_WEBHOOK in your GitHub repository Actions secrets

This is the gong gif:

@jssteinberg
jssteinberg / GTM.svelte
Last active September 8, 2023 14:51
How to Implement Google Tag Manager in Svelte, in Functional Programming
<script>
import { onMount } from 'svelte';
/** @type {string} gtmId - GTM ID 'GTM-F00BARS'. */
export let gtmId = '';
/** @type {(Object[]|Object)} [gtmDataPoints=[]] - Array or single object of custom data points for dataLayer.
* @type {Object} [gtmDataPoints[]] - Custom data point Object.
* @type {string} [gtmDataPoints[][]] - Custom data point property. */
export let gtmDataPoints = [];
/** @type {number} [timeout] - The number of milliseconds to timeout intiating loading the GTM script from Google */
@lukas-h
lukas-h / firebase.json
Created December 5, 2019 01:57
my firebase hosting config file
{
"hosting": {
"public": "_site",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"headers": [{
"source": "**",
@watura
watura / Fastfile
Last active October 28, 2020 21:14
Flutter ios firebase app distribution
require 'fileutils'
default_platform :ios
platform :ios do
before_all do |lane, options|
if is_ci
ENV['MATCH_KEYCHAIN_NAME'] = 'TempKeychain'
ENV['MATCH_KEYCHAIN_PASSWORD'] = 'TempKeychainPassword'
create_temp_keychain
@rodydavis
rodydavis / flutter_github_ci.yml
Last active May 30, 2024 00:11
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@sma
sma / example.dart
Last active July 12, 2023 03:00
A flutter example demonstrating a custom painter drawing selectable rects
// run in DartPad: <https://dartpad.dev/c6a9111d58c3deb83711106cec6152ee>
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: RectsExample()));
}
class RectsExample extends StatefulWidget {
@override
@laurenzlong
laurenzlong / index.js
Last active October 4, 2021 04:55
Firebase Cloud Messaging + Cloud Functions
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.sendLeaderboardMesssage = functions
.database
.ref('/leaderboard/{position}')
.onUpdate((change) => {
const oldPlayer = change.before.val();
@zbjornson
zbjornson / dns.js
Last active January 12, 2019 12:15
const name = "<some domain>";
const AWS = require("aws-sdk");
const route53 = new AWS.Route53();
const DNS = require("@google-cloud/dns");
const dns = new DNS({projectId: "<your project id>"});
const dnsZone = dns.zone("<zone name>");
const resolvers = [ // See note below -- set to the NS for your zone
"<dns server 1>",
"<dns server 2>"//, ...
@ozasadnyy
ozasadnyy / firebase-function-image-optimization.js
Created November 1, 2017 10:44
Optimize images with Firebase Storage and Functions on a fly
'use strict';
const functions = require('firebase-functions');
const gcs = require('@google-cloud/storage')();
const spawn = require('child-process-promise').spawn;
const mkdirp = require('mkdirp-promise');
const path = require('path');
const os = require('os');
const fs = require('fs');
@helmasaur
helmasaur / license-badges.md
Last active March 1, 2022 16:49 — forked from lukas-h/license-badges.md
Badges de licence pour vos projet

Badges de licence en Markdown

Collection de badges de licence pour le fichier README de vos projets. Copiez-collez facilement le code dessous les badges dans vos fichier au format Markdown.

Notes

  • Les badges sont réalisé avec Shields.io.
  • Ces badges ne remplacent pas les informations concernant vos projets. Il s'agit seulement d'images pour le fichier README afin que les utilisateurs voient en un coup d'œil la licence choisie.

Vous souhaitez qu'une licence soit ajoutée ?

Commentez ce gist ou contactez le créateur du gist original via un commentaire ou via courriel (lukas@himsel.me)