Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
export NODE_OPTIONS="--max-old-space-size=1028"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 16
@kevupton
kevupton / contracts...2022-04-07_AirGrabbable.sol
Created April 7, 2022 02:40
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract PooNami is ERC20 {
constructor() ERC20('PooNami', 'POO') {
_mint(msg.sender, 1e24);
}
}
contract AirGrap {
@kevupton
kevupton / contracts...2022-04-07_AirGrabbable.sol
Created April 7, 2022 02:38
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract PooNami is ERC20 {
constructor() ERC20('PooNami', 'POO') {
_mint(msg.sender, 1e24);
}
}
interface IMintable {
<template>
<div class="hello">Hello {{who}} World</div>
</template>
<script>
module.exports = {
props: {
who: String,
},
};
@kevupton
kevupton / fx-if.directive.ts
Last active September 1, 2019 03:52
Angular Flex Layout fxIf equivalent of ngIf
import { isPlatformBrowser } from '@angular/common';
import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core';
import { MediaObserver } from '@angular/flex-layout';
import { BehaviorSubject, combineLatest, Subscription } from 'rxjs';
@Directive({
selector: '[fxIf],' + ['xs', 'md', 'lg', 'xl', 'lt-sm', 'lt-md', 'lt-lg',
'lt-xl', 'gt-xs', 'gt-sm', 'gt-md', 'gt-lg'].map(key => `[fxIf.${key}]`).join(','),
})
export class FxIfDirective implements OnInit, OnDestroy {
interface ScrollSectionConfig {
height : number;
speed : number;
}
interface Vector {
x : number;
y : number;
}
@kevupton
kevupton / convert-webp
Created April 5, 2019 04:44
WebP convert all images in current directory
#!/bin/bash
for file in *
do
echo "Converting: '$file'"
cwebp -q 80 "$file" -o "webp/$file.webp" > /dev/null 2>&1
done
echo "Complete!"
@kevupton
kevupton / xxx.sh
Last active February 18, 2019 22:13
Git Commiter with ID
#!/bin/bash
{
# BRANCH="feature/AGS-62-agtrader-digital-ad-changes-for-d"
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>&1)
} || {
echo "Is not a git repository..."
exit 1;
}
@kevupton
kevupton / xc.sh
Last active February 18, 2019 22:15
Checkouter
#!/bin/bash
command=$(basename $0)
usage() { printf "Usage: ${BLUE}$command${NC} ${RED}[search-term]${NC} ${GREEN}[-f]${NC}\n" 1>&2; exit 1; }
CODE=$1
TMP=~/.xc
TIME_CHANGE=3600
RED='\033[0;33m'
@kevupton
kevupton / test.json
Created January 9, 2019 07:45
Test File
{
"Test": true
}