Skip to content

Instantly share code, notes, and snippets.

View RealDyllon's full-sized avatar
🎯
Focusing

Dyllon Gunawardhana RealDyllon

🎯
Focusing
View GitHub Profile
@RealDyllon
RealDyllon / populate_mssqldb.py
Created April 1, 2022 06:26
populate mssqldb
from datetime import datetime
from faker import Faker
from faker.providers import date_time, address
from random import randint
fake = Faker()
fake.add_provider(date_time)
productsInShops = [
@RealDyllon
RealDyllon / store.js
Created May 27, 2021 09:58
React Native Redux store with reactrotron debugging in DEV
import { applyMiddleware, compose, createStore } from 'redux'
import thunk from 'redux-thunk'
import reducers from 'reducers'
const middleware = [thunk]
let enhancers
// eslint-disable-next-line
if (__DEV__) {
@RealDyllon
RealDyllon / index.js
Last active May 3, 2021 14:43
AWS Lambda ES6 Async Handler Template
export async function handler(event, context) {
// await stuff here
}

CZ1115 Code Snippets and Samples

Made with ♥️ by Dyllon

@RealDyllon
RealDyllon / AppDelegate.m
Created January 10, 2021 05:43
react-native-firebase iOS Configuration with Expo Bare
#import <Firebase.h> // see: https://rnfirebase.io/#configure-firebase-with-ios-credentials
#import "RNFBMessagingModule.h"
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <UMCore/UMModuleRegistry.h>
#import <UMReactNativeAdapter/UMNativeModulesProxy.h>
@RealDyllon
RealDyllon / pandora-enhancer-chrome.js
Last active December 21, 2021 23:16
Enhance Pandora via Tampermonkey / Greasemonkey
// ==UserScript==
// @name Pandora Enhancer
// @namespace https://www.pandora.com/
// @version 1.0
// @description hides perma-sidebar for ads
// @author www.github.com/RealDyllon
// @match https://www.pandora.com/*
// @icon https://www.google.com/s2/favicons?domain=pandora.com
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
#!/usr/bin/env bash
apt update
apt upgrade
apt install build-essentials
dpkg --add-architecture i386
apt install wine64 wine32
apt install dpkg fakeroot rpm
@RealDyllon
RealDyllon / print_c_support.c
Last active November 14, 2020 09:41
Print C Version Compiler Support
#if defined(__STDC__)
printf("Supports C89\n");
# if defined(__STDC_VERSION__)
printf("Supports C90\n");
# if (__STDC_VERSION__ >= 199409L)
printf("Supports C94\n");
# endif
# if (__STDC_VERSION__ >= 199901L)
printf("Supports C99\n");
# endif
@RealDyllon
RealDyllon / express_app.js
Last active October 14, 2020 10:14
server.js
const express = require("express");
const app = express();
app.listen(3000, () => {
console.log("Server running on port 3000");
});
app.all("/", (req, res) => {
res.set({
"Content-Type": "application/json",
@RealDyllon
RealDyllon / web.config
Last active October 14, 2020 10:15 — forked from davidebbo/web.config
Default web.config used for node.js apps on Azure Web Apps
<?xml version="1.0" encoding="utf-8"?>
<!--
AZURE APP SERVICE - WEB CONFIG FOR EXPRESS APP HOSTED ON WINDOWS WEB APP
-->
<!--
This configuration file is required if iisnode is used to run node processes behind
IIS or IIS Express. For more information, visit:
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->