This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local function logMessage(_type, message) | |
| local color = _type == 'success' and '^2' or '^1' | |
| print(('^8[GD3V]%s %s^7'):format(color, message)) | |
| end | |
| local function checkMenuVersion() | |
| PerformHttpRequest('https://raw.githubusercontent.com/MrGrootx/g-updates/master/g-ownable-job-vehicle.txt', | |
| function(err, text, headers) | |
| if err ~= 200 then | |
| logMessage('error', 'Unable to run a version check. Error: ' .. err) |
Starting a personal node project could be easy; starting a team node project could be challenging.
I Forked from https://gist.github.com/silver-xu/1dcceaa14c4f0253d9637d4811948437 and customize for myself.
In my experience, common mistakes developer make when starting a projects are:
- No Linting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| The MIT License (MIT) | |
| Original work Copyright (c) 2014 Ismael Celis | |
| Modified work Copyright 2022 Markus Bach | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
| if [[ "$STAGED_FILES" = "" ]]; then | |
| exit 0 | |
| fi | |
| PASS=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| await mongoose.connect(dbUrl, { | |
| useNewUrlParser: true, | |
| useUnifiedTopology: true, | |
| useCreateIndex: true, | |
| useFindAndModify: false, | |
| }); | |
| const connection = mongoose.connection; | |
| connection.once("open", function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Wait for LDXE to load | |
| sleep 5 | |
| # Stream URL | |
| url='https://stream.revma.ihrhls.com/zc829' | |
| # Start VLC once in the background if not already running | |
| start_vlc_once() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # first: mkdir user && cd user && cp /path/to/get_gists.py . | |
| # python3 get_gists.py user | |
| import requests | |
| import sys | |
| from subprocess import call | |
| user = sys.argv[1] | |
| r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
(() => {
let { offsetWidth, offsetHeight } = document.documentElement;
let walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
while (walker.nextNode()) {
let bound = walker.currentNode.getBoundingClientRect();
let isWidthOverflow = bound.right > offsetWidth || bound.left < 0;
let isHeightOverflow = bound.bottom > offsetHeight || bound.top < 0;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Youtube tutorial here: https://youtu.be/LDgPTw6tePk | |
| // These functions are designed to be exported, but you could create a class instead. See tutorial video. | |
| // #1 proper case | |
| export const properCase = (string) => { | |
| return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`; | |
| }; | |
NewerOlder
