Skip to content

Instantly share code, notes, and snippets.

@Shukuyen
Shukuyen / cleandroid
Last active Sep 16, 2022
Shell script to clean up Android status bar for screenshots or screen recordings
View cleandroid
#! /bin/sh
DEVICES=$(adb devices | wc -l)
if [ $DEVICES -le 2 ]
then
echo "No devices connected via adb."
exit 1
fi
@Shukuyen
Shukuyen / CircleText.swift
Created May 8, 2022
SwiftUI view that writes text inside a circle. This is very specific to a project I am working on and not really customizable. It can be extended if you want to.
View CircleText.swift
//
// CircleText.swift
//
// Created by Cornelius Schiffer on 07.05.22.
import SwiftUI
extension String {
func size(usingFont font: UIFont) -> CGSize {
let attributes = [NSAttributedString.Key.font: font]
@Shukuyen
Shukuyen / Brewfile
Last active Mar 3, 2022
Brewfile for quick setup of new Mac computers via brew, brew cask and mas-cli
View Brewfile
# Requirements:
# homebrew - http://brew.sh/
# brew bundle - https://github.com/Homebrew/homebrew-bundle
# cask - https://caskroom.github.io/ (installed automatically)
# mas-cli - https://github.com/argon/mas
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap 'caskroom/versions'
brew 'bat'
@Shukuyen
Shukuyen / custom-views.patch
Created Nov 8, 2013
wordpress clean and simple contact form by meg nicholas custom view patch
View custom-views.patch
Index: class.view.php
===================================================================
--- class.view.php (revision 800373)
+++ class.view.php (working copy)
@@ -16,9 +16,13 @@
public
function __construct($view)
{
-
- if (file_exists(CSCF_PLUGIN_DIR . "/views/" . $view . ".view.php"))