Skip to content

Instantly share code, notes, and snippets.

View martinemmert's full-sized avatar
🚀
Hello World

Martin Emmert martinemmert

🚀
Hello World
View GitHub Profile
@martinemmert
martinemmert / programming.yml
Created November 2, 2022 10:12
Espanso / Match
matches:
- trigger: ".> "
replace: "-> "
- trigger: "..> "
replace: "=> "
@martinemmert
martinemmert / default.yml
Created November 2, 2022 10:11
Espanso / Config
# espanso configuration file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the global configuration options for espanso.
# These are the parameters that will be used by default on every application,
# but you can also override them on a per-application basis.
# To make customization easier, this file contains some of the commonly used
# parameters. Feel free to uncomment and tune them to fit your needs!
Step 1*
mobile number form*
submit -> verify mobile number
verify mobile number
api error -> mobile number error
done -> Step 2
mobile number error
try again -> Step 1
Step 2
@martinemmert
martinemmert / DemoScreen.tsx
Created January 19, 2018 14:15
This gist shows the a working type definition for navigationOptions for your screens when using Typescript with react and react-navigation
import * as React from "react";
import { Text, View } from "react-native";
import { NavigationScreenConfigProps, NavigationScreenProps } from "react-navigation";
type Params = { title: string };
type DemoScreenProps = NavigationScreenConfigProps;
class DemoScreen extends React.PureComponent<DemoScreenProps> {
public static navigationOptions = ({ navigation }: NavigationScreenProps<Params>) => ({
title: navigation.state.params.title,
import {
globalRegistry,
WebGLTextureLoaderSyncHashCache,
} from "webgltexture-loader";
export interface ArrayBufferInput {
data: ArrayBuffer;
hash: string;
}
@martinemmert
martinemmert / hires2lowres
Created August 24, 2014 23:33
Bash script to downsize @2x.* images in the current directory...
#!/bin/bash
#simple script to downsize @2x.* images to maxWH 1024 in one folder
## create the directory to keep the lowres files
mkdir lowres
## downsize all images with @2x in the filename
sips -Z 1024 *@2x* --out lowres
## switch into the directory where the lowres files are stored
@martinemmert
martinemmert / gist:2624753
Created May 6, 2012 21:57
checks urls redirects from a text file
#!/bin/bash
# clear the terminal
clear
# define some colors
txtred=$(tput setaf 1)
txtgreen=$(tput setaf 2)
txtrst=$(tput sgr0)