Skip to content

Instantly share code, notes, and snippets.

View nickgarkusha's full-sized avatar

Nick Garkusha nickgarkusha

  • Fubo
  • SFBA
View GitHub Profile
@nickgarkusha
nickgarkusha / NerdBot
Created April 11, 2021 04:49 — forked from venetucci/NerdBot
🤓 A Google Apps Script to use with Slack webhooks - allows you to post to a spreadsheet from Slack, and receive a confirmation message in Slack. Full tutorial with Slack integrations: https://medium.com/p/a-bot-to-help-you-read-your-way-through-next-4-years-7ba9d80066fc
function testNewItemPost() {
var request = {
parameters: {
token: "[]",
user_name: "michelle",
text: "add: Rural America; Hillbilly Elegy; J.D. Vance; From a former marine and Yale Law School graduate, a powerful account of growing up in a poor Rust Belt town that offers a broader, probing look at the struggles of America’s white working class; https://www.amazon.com/gp/product/0062300547/ref=pd_bxgy_14_2?ie=UTF8&pd_rd_i=0062300547&pd_rd_r=MG2AV2PZZVEXNYZ1Y84V&pd_rd_w=xCKNl&pd_rd_wg=55Iya&psc=1&refRID=MG2AV2PZZVEXNYZ1Y84V;"
}
};
doPost(request);
}
@nickgarkusha
nickgarkusha / UIAlertController+TextField.swift
Created November 15, 2020 17:57 — forked from ole/UIAlertController+TextField.swift
A UIAlertController with a text field and the ability to perform validation on the text the user has entered while the alert is on screen. The OK button is only enabled when the entered text passes validation. More info: https://oleb.net/2018/uialertcontroller-textfield/
import UIKit
/// A validation rule for text input.
public enum TextValidationRule {
/// Any input is valid, including an empty string.
case noRestriction
/// The input must not be empty.
case nonEmpty
/// The enitre input must match a regular expression. A matching substring is not enough.
case regularExpression(NSRegularExpression)
@nickgarkusha
nickgarkusha / README.md
Created November 14, 2020 21:34 — forked from acrookston/README.md
Xcode pre-action to build custom Info.plist

Automatic build versions from git in Xcode (and other goodies)

Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.

1. Xcode Scheme pre-action

Edit Xcode Scheme and add a pre-action script. Copy the contents of preaction.sh into the pre-action script box.

@nickgarkusha
nickgarkusha / pod_force_reinstall.sh
Created November 14, 2020 21:23 — forked from aanari/pod_force_reinstall.sh
Reinstall Cocoa Pods and Clear Cache
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.1.1
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf Pods
pod update
@nickgarkusha
nickgarkusha / xcci.md
Created October 18, 2020 00:24 — forked from quellish/xcci.md
Xcode CI script variables

Variable

Type

@nickgarkusha
nickgarkusha / gist:95303eeed491e1732dd66539b17e0f33
Created October 18, 2020 00:06 — forked from diederich/gist:f49670cf08613101b59ace318758b226
Post notification to Slack after Xcode bot build
#!/usr/bin/env python
import os
import requests
import json
print "Slack it up v.1.3"
slack_hook = "HOOK"
xcode_server_url = "xcbot://your.server.name"