Skip to content

Instantly share code, notes, and snippets.

View bcye's full-sized avatar

Bruce bcye

View GitHub Profile
bcye / main.swift
Created April 3, 2018 10:42
How to call a function of a vc inside another vc.
//Inside the main vc i put a function like this
//Function fetches data and calcs the total
func changeNavTitle() {
// It does some stuff and then updates navigation label (you can change this to another label)
titleNav.title = "\(sum)\(currencySymbol)"
fetchedResultsController.changedContent = false
//Inside the other vc I call the function like this:
sudo gem install cocoapods
cd #directory
pod init
target 'placeholder' do
pod 'Sentry', :git => '', :tag => '4.1.0'
import Sentry
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Create a Sentry client and start crash handler
do {
Client.shared = try Client(dsn: "yourDNS")
try Client.shared?.startCrashHandler()
} catch let error {
if which sentry-cli >/dev/null; then
export SENTRY_ORG=yourorg
export SENTRY_PROJECT=yourproject
export SENTRY_AUTH_TOKEN=yourtoken
ERROR=$(sentry-cli upload-dif "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)
if [ ! $? -eq 0 ]; then
echo "warning: sentry-cli - $ERROR"
echo "warning: sentry-cli not installed, download from"
bcye /
Created April 25, 2019 00:26
Out of office for twitter notes

Out of Office for Twitter [XXX]


Replies to every mention (or reply) with a message saying they are out of office, when they will be back, and an email they can reach out to for important messages.

The email can be their own or automatically generated by the service and just be forwarding the emails.


  • Free if you include an ad for the service in your tweets.
  • Priced on a per use basis to remove ads from the website, your tweets and enable the option to make an email forward
  • option for flatrate for frequent users
bcye / index.html
Last active June 18, 2019 04:18
A simple example of how to align navigation bar items to the right in Bootstrap 4.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<meta charset="utf-8">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
bcye /
Created January 21, 2020 09:58
keybase proof

Keybase proof

I hereby claim:

  • I am bcye on github.
  • I am br2020 ( on keybase.
  • I have a public key ASB2L-qaeKy-K2R2ndBITDx1opQPI9tLW1GLzxkTta-LAwo

To claim this, I am signing this object:

bcye / FormatJS Snippets.json
Last active July 6, 2023 16:00
VS Code Snippets
"Imperative Message": {
"scope": "javascript,typescript,javascriptreact,typescriptreact",
"prefix": "imsg",
"body": "intl.formatMessage({ defaultMessage: '$1' })$0"
"Message Component": {
"scope": "javascriptreact,typescriptreact",
"prefix": "fmsg",
"body": "<FormattedMessage defaultMessage={'$1'} />$0"
bcye /
Last active April 29, 2024 09:18
Make ics events recurring

ETH myStudies ics Script

This script is intended to be used with the ics files outputted by myStudies, to make importing your schedule into your calendar easier.

myStudies does not export recurring events, but instead individual events for every date. This makes it hard if you want to edit them, because you can't edit them as a series.


Call this script with these arguments:

  1. input ics file
  2. output ics file name
  3. start date of events to be considered (choose exactly one week, all events in the given timeframe will be kept with the added weekly recurrence rule)