Skip to content

Instantly share code, notes, and snippets.

View Kilo-Loco's full-sized avatar
💪
Keep Moving Forward

Kyle Lee Kilo-Loco

💪
Keep Moving Forward
View GitHub Profile
@Kilo-Loco
Kilo-Loco / .deps...npm...hardhat...console.sol
Created March 13, 2024 12:39
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.19+commit.7dd6d404.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS =
0x000000000000000000636F6e736F6c652e6c6f67;
function _sendLogPayloadImplementation(bytes memory payload) internal view {
address consoleAddress = CONSOLE_ADDRESS;
/// @solidity memory-safe-assembly
@Kilo-Loco
Kilo-Loco / EtherWallet.sol
Created February 22, 2024 06:54
First Smart Contract Wallet
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract EtherWallet {
address payable public owner;
modifier onlyOwner {
require(msg.sender == owner, "Only the owner can complete this opporation");
_;

Keybase proof

I hereby claim:

  • I am kilo-loco on github.
  • I am kilo_loco (https://keybase.io/kilo_loco) on keybase.
  • I have a public key ASDRWDLZRY6QzlM48YmXfB07iJFubgkYKKPzyxA4Y0BkdAo

To claim this, I am signing this object:

@Kilo-Loco
Kilo-Loco / record-simulator.sh
Created August 4, 2020 20:11
Bash script for recording Xcode Simulator
#!/bin/bash
echo "🤔 Enter a video name:"
read name
name="${name}.mp4"
echo
echo "📹 Recording $name"
echo
@Kilo-Loco
Kilo-Loco / teams-faceoff.swift
Created June 28, 2020 13:29
Show faceoff teams
struct TeamFaceOffView: View {
let teams = Animal.all
var body: some View {
List {
let indecies = Array(0 ..< teams.count)
.filter { $0.isMultiple(of: 2) }
@Kilo-Loco
Kilo-Loco / rename-master-to-main.sh
Created June 15, 2020 15:19
How to rename master to main with Git
git branch -m master main
git push -u origin main
git checkout master
git branch -m master main
git fetch
git branch --unset-upstream
git branch -u origin/main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
@Kilo-Loco
Kilo-Loco / decode-dynamic-keys.swift
Last active February 16, 2023 14:15
Decoding nested objects with dynamic keys
import Foundation
// JSON response converted to Data
let response = """
{
"name": "Kilo Loco",
"pets": {
"0": {
"name": "Doggo"
},

Keybase proof

I hereby claim:

  • I am kilo-loco on github.
  • I am kilo_loco (https://keybase.io/kilo_loco) on keybase.
  • I have a public key ASAzpyaHbSveWBqqL4PreVTv5mCZgmqwn47gJ5W6I7jujgo

To claim this, I am signing this object:

@Kilo-Loco
Kilo-Loco / CurrencyResult.swift
Last active November 12, 2018 06:22
Currency Result
struct CurrencyResult: Codable {
let success: Bool
let name: String
let date: String
let rawCurrencies: [String: Float]
var currencies: [Currency] {
var currencies = [Currency]()
@Kilo-Loco
Kilo-Loco / Kilo Loco Xcode Theme.txt
Created October 11, 2017 04:28
This is the Kilo Loco Xcode theme that you can see by watching any of the videos on youtube.com/kiloloco
*SOURCE EDITOR*
Plain - #FFFFFF - SF Mono Regular 14.0
Comments - #7F7F7F - SF Mono Regular Italic 14.0
Strings - #F9EC12 - SF Mono Regular 14.0
Characters / Numbers - #786DFF - SF Mono Regular 14.0
Keywords - #F100FF - SF Mono Regular 14.0
Processor Statements - #E47C48 - SF Mono Regular 14.0
URLs - #4164FF - SF Mono Regular 14.0
Attributes - #2D449B - SF Mono Regular 14.0
Project - #2CFF33 - SF Mono Regular 14.0