Skip to content

Instantly share code, notes, and snippets.

View gillkyle's full-sized avatar
🐛
releasing more bugs into the wild

Kyle Gill gillkyle

🐛
releasing more bugs into the wild
View GitHub Profile
@astuyve
astuyve / deny_snippet.json
Created January 17, 2024 15:00
Deny cloudwatch permissions from Lambda to save money
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@kiliman
kiliman / ts2js.sh
Last active July 22, 2024 03:11
Script to convert TypeScript files to JavaScript
#!/bin/bash
# Check if the correct number of arguments is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 source_folder target_folder"
exit 1
fi
source_folder="$1"
target_folder="$2"
export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
@JeremyTheModernist
JeremyTheModernist / app.js
Created September 14, 2020 18:02
A gist for very basic server side authorization
const express = require('express');
const bodyParser = require('body-parser');
const jwt = require('jsonwebtoken');
const app = express();
app.use(bodyParser.json());
const users = [];
// helpful article:
// https://dev.to/elisealcala/react-context-with-usereducer-and-typescript-4obm
import React, { createContext, useContext, useReducer } from "react";
type IState = {
count: number;
message?: string;
};
import React, { useState, createContext, useContext } from "react";
import { uuid } from "uuidv4";
var initialState = [
{
id: uuid(),
title: "Intro to HTML",
description: "Learn everything you need to know about html!",
duration: "1hr 5min",
},
@chris-sev
chris-sev / setup.sh
Last active July 17, 2024 17:57
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
@mattmc3
mattmc3 / modern_sql_style_guide.md
Last active July 8, 2024 19:25
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2024 14:45
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j