Navigation Menu

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 / CocoaLumberjack.swift
Created August 16, 2014 21:41
A little hack to work comfortably with cocoa lumberjack in Swift.
// Created by Ullrich Schäfer on 16/08/14.
// Bitmasks are a bit tricky in swift
// See http://natecook.com/blog/2014/07/swift-options-bitmask-generator/
//enum LogFlag: Int32 {
// case Error = 0b1
// case Warn = 0b10
// case Info = 0b100
@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 }
module DeviseUrlWorkaroundHelper
def session_path(resource_or_scope, *args)
scope = Devise::Mapping.find_scope!(resource_or_scope)
_devise_route_context.send("#{scope}_session_path", *args)
end
def new_session_path(resource_or_scope, *args)
scope = Devise::Mapping.find_scope!(resource_or_scope)
_devise_route_context.send("new_#{scope}_session_path", *args)
end
def destroy_session_path(resource_or_scope, *args)
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