Skip to content

Instantly share code, notes, and snippets.

View yungwarlock's full-sized avatar

Damian yungwarlock

View GitHub Profile
@yungwarlock
yungwarlock / mobile.yaml
Created October 15, 2023 16:54
Simple Github action to build flutter project
name: Mobile
on:
workflow_dispatch:
push:
branches: [master]
permissions:
contents: read
pull-requests: read
@yungwarlock
yungwarlock / globals.css
Last active September 30, 2023 15:18
Tailwind hidescrollbar
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer utilities {
@layer components {
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
@yungwarlock
yungwarlock / main.dart
Last active September 4, 2023 13:26
SchedulerBinding
import 'package:flutter/material.dart';
import "package:flutter/scheduler.dart";
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
/* item.subtitle != null */
/* ? Container( */
/* padding: const EdgeInsets.symmetric( */
/* vertical: 4, */
/* horizontal: 8, */
/* ), */
/* color: Colors.grey[100], */
/* child: Row( */
/* children: [ */
/* CircleAvatar( */
@yungwarlock
yungwarlock / main.js
Created August 21, 2023 13:51
Uploading a file using file stream to firebase storage
// async function uploadCourseThumbnail(path: string) {
// const fileID = createID();
// const file = storage.file(`${fileID}.png`);
// file.makePublic();
// return new Promise((resolve, reject) => {
// const publicUrl = file.publicUrl();
async function uploadCourseThumbnail(path: string) {
const fileID = createID();
const file = storage.file(`${fileID}.png`);
file.makePublic();
return new Promise((resolve, reject) => {
const publicUrl = file.publicUrl();
fs.createReadStream(path)
@yungwarlock
yungwarlock / nearest_neighbor.ipynb
Created July 2, 2023 01:09
nearest_neighbor.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yungwarlock
yungwarlock / main.dart
Last active June 26, 2023 14:24
Dart Timer
import 'dart:async';
void main() {
int countDown = 60;
bool shouldShowResend = false;
Timer.periodic(const Duration(seconds: 1), (t) {
print(formatTime(countDown));
print(shouldShowResend);
});
#!/usr/bin/env bash
# Initialize all the option variables.
# This ensures we are not contaminated by variables from the environment.
file=
verbose=0
show_help() {
echo "Hello"
}
@yungwarlock
yungwarlock / pull_request.md
Created April 16, 2022 09:38
Fixing bazel rules_python import issues