Skip to content

Instantly share code, notes, and snippets.

View ajurcevic's full-sized avatar

Adrian Jurcevic ajurcevic

  • Perth, Australia
View GitHub Profile
@ajurcevic
ajurcevic / cleanup-service.sh
Created March 14, 2023 14:55
Cleanup Services
#!/usr/bin/env bash
set -e
sudo systemctl stop ipfs.service
sudo systemctl stop ipfs-cluster.service
sudo systemctl disable ipfs.service
sudo systemctl disable ipfs-cluster.service
sudo rm /etc/systemd/system/ipfs.service
sudo rm /etc/systemd/system/ipfs-cluster.service
@ajurcevic
ajurcevic / README.txt
Created January 4, 2022 23:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@ajurcevic
ajurcevic / index.js
Created March 6, 2020 03:43
Cloud functions to manage user pin code
// orignal source
// https://github.com/lemberg/connfa-ios/blob/master/Cloud-Functions/functions/index.js
// Added region and updated packages for Cloud Functions to the following:
// "firebase-admin": "^8.9.0"
// "firebase-functions": "^3.3.0"
// "node": "10"
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const region = "asia-northeast1";

Keybase proof

I hereby claim:

  • I am ajurcevic on github.
  • I am ajurcevic (https://keybase.io/ajurcevic) on keybase.
  • I have a public key ASAkZKQkEXgD5YEhSM0WCsq6jodnJUIFq8uiaZvk61rl4Ao

To claim this, I am signing this object:

@ajurcevic
ajurcevic / index.js
Last active June 12, 2019 14:38
Cloud Function with Realtime Database Trigger
/*
# author: Adrian Jurcevic
# github: @ajurcevic
# sample to send remote notifications from realtime database updates.
# utilising latest firebase-functions v2.3.1
# 10/06/2019
*/
const functions = require('firebase-functions');
const admin = require('firebase-admin');

Keybase proof

I hereby claim:

  • I am ajurcevic on github.
  • I am ajurcevic (https://keybase.io/ajurcevic) on keybase.
  • I have a public key ASDKEjrg_wkLCP6FjP1RqjnM21drlrX1sCfVWcEnRE7Grwo

To claim this, I am signing this object: