Skip to content

Instantly share code, notes, and snippets.

View ezokoze's full-sized avatar
🔳
blockchain

ezokoze ezokoze

🔳
blockchain
View GitHub Profile
@ezokoze
ezokoze / cloudSettings
Last active November 24, 2021 19:06 — forked from codediodeio/auth.guard.ts
Angular Firebase Router Guard with Browser Refresh
{"lastUpload":"2021-11-24T19:05:48.663Z","extensionVersion":"v3.4.3"}
@codediodeio
codediodeio / auth.guard.ts
Last active August 28, 2020 02:50
Angular Firebase Router Guard with Browser Refresh
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { AngularFireAuth } from 'angularfire2/auth';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/take';
@Injectable()
export class AuthGuard implements CanActivate {
@jamescmartinez
jamescmartinez / slack_delete.rb
Last active May 28, 2024 15:00
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,