Skip to content

Instantly share code, notes, and snippets.

View stigi's full-sized avatar
✌️
Casual coding

Ullrich Schäfer stigi

✌️
Casual coding
View GitHub Profile
@stigi
stigi / post-receive
Created February 21, 2024 21:32
Git Hook: docker compose deploy
#!/usr/bin/env bash
# A git post-receive hook
#
# On main branch only :
# 1. It builds the service via docker compose build
# 2. It then restarts the service by bringing it down and up again (full service reboot)
# Also removes old containers.
#
@stigi
stigi / buergerbot.rb
Created January 23, 2023 11:27 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
require 'watir-webdriver'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e
@stigi
stigi / AppDelegate.diff
Created September 24, 2022 09:42
React Native upgrade diff for AppDelegate between 0.67.4 and 0.69.5
--- AppDelegate.m 2022-09-24 11:31:14.000000000 +0200
+++ AppDelegate.mm 2022-09-24 11:29:53.000000000 +0200
@@ -4,42 +4,52 @@
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
-#ifdef FB_SONARKIT_ENABLED
-#import <FlipperKit/FlipperClient.h>
-#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
-#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
@stigi
stigi / @react-native-community+cli-platform-android+5.0.1-alpha.1.patch
Created April 26, 2021 11:43
Patch file causing problems with `patch-package` on windows
diff --git a/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.d.ts b/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.d.ts
index 54ed145..02dbbf4 100644
--- a/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.d.ts
+++ b/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.d.ts
@@ -2,7 +2,8 @@ import { Config } from '@react-native-community/cli-types';
export interface Flags {
tasks?: Array<string>;
root: string;
- variant: string;
+ flavor: string;
@stigi
stigi / pomodoro.sh
Created March 25, 2020 17:09
Update your Slack status from the command line for Pomodoro
#!/usr/bin/env bash
text=":tomato: focus time"
emoji=":tomato:"
expiration=`date +%s`
expiration=$((expiration + 1500))
data=$( jq -n \
import React from 'react'
import { Button } from 'react-native'
interface Props {}
interface State {
isDoing: boolean
}
export class WithButton extends React.Component<Props, State> {
public state: State = { isDoing: false }
diff --git a/node_modules/@nozbe/watermelondb/WatermelonDB.podspec b/node_modules/@nozbe/watermelondb/WatermelonDB.podspec
new file mode 100644
index 0000000..bb0eac2
--- /dev/null
+++ b/node_modules/@nozbe/watermelondb/WatermelonDB.podspec
@@ -0,0 +1,19 @@
+require "json"
+
+Pod::Spec.new do |s|
+ # NPM package specification
~ code --list-extensions --show-versions
bungcip.better-toml@0.3.2
christian-kohler.npm-intellisense@1.3.0
donjayamanne.githistory@0.4.6
eamodio.gitlens@9.5.1
EditorConfig.EditorConfig@0.13.0
eg2.tslint@1.0.43
esbenp.prettier-vscode@1.8.1
fatihacet.gitlab-workflow@2.0.1
flowtype.flow-for-vscode@1.1.0
@stigi
stigi / persisted-hooks.js
Created October 27, 2018 08:15
A small experiment on how a persisted state hook good be implemented
import React, { useState } from "react";
import ReactDOM from "react-dom";
const usePersistedState = (initialState, key) => {
// Check if we have a value stored
let value = localStorage.getItem(key);
if (!value) {
value = initialState;
} else {
value = JSON.parse(value);
@stigi
stigi / fix-rn-xcode10-build.sh
Created October 24, 2018 11:57
Fixes Xcode 10 builds for older react native issues.
#!/bin/sh
# Make sure node packages are there
yarn
# 1st fix: glog config.h not found
# Manually trigger 3rd party installs
cd node_modules/react-native
./scripts/ios-install-third-party.sh