Skip to content

Instantly share code, notes, and snippets.

View Nothing-Works's full-sized avatar
🏠
Working from home

Andy Nothing-Works

🏠
Working from home
  • Wellington New Zealand
View GitHub Profile
@Nothing-Works
Nothing-Works / .prettierrc.cjs
Last active June 1, 2024 12:07
vite react eslint prettier
module.exports = {
experimentalTernaries: true,
semi: false,
singleQuote: true,
jsxSingleQuote: true,
arrowParens: "avoid",
};
// npm i prettier eslint-plugin-prettier eslint-config-prettier --save-dev
[*.cs]
# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none
# IDE0053: Use expression body for lambda expressions
dotnet_diagnostic.IDE0053.severity = none
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:error
csharp_prefer_simple_using_statement = true:error
@Nothing-Works
Nothing-Works / .editorconfig
Created January 6, 2023 11:13
Dotnet editorconfig - 2023
##########################################
# Common Settings
##########################################
# This file is the top-most EditorConfig file
root = true
# All Files
[*]
charset = utf-8
@Nothing-Works
Nothing-Works / .eslintrc.js
Created June 14, 2022 13:21
globally eslint file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@Nothing-Works
Nothing-Works / .editorconfig
Last active November 16, 2021 00:18
Dotnet editorconfig
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
@Nothing-Works
Nothing-Works / SP.sql
Created September 3, 2020 09:32
SP for inserting data
DROP PROCEDURE IF EXISTS test;
DELIMITER #
CREATE PROCEDURE test()
BEGIN
DECLARE i INT UNSIGNED DEFAULT 1;
WHILE i < 100000 DO
insert into video_downloads (user_id, video_id, download_at) values ((rand() * 10000),(rand() * 1000),FROM_UNIXTIME(
UNIX_TIMESTAMP('2015-04-30 14:53:27') + FLOOR(0 + (RAND() * 315360000))
));
SET i = i + 1;
@Nothing-Works
Nothing-Works / eslintrc.md
Last active June 24, 2020 21:48
eslint and vscode

A .prettierrc.json is always helpful

{
  "trailingComma": "none",
  "tabWidth": 4,
  "semi": false,
  "singleQuote": true
}
@Nothing-Works
Nothing-Works / readme.md
Last active June 9, 2020 08:39
some git workflow

sync fork with upstream

  1. Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
  1. Make sure that you're on your master branch:
@Nothing-Works
Nothing-Works / .js
Created November 29, 2019 04:52
random ST question
let arr = [
{
name: 'user',
age: 1
},
{
name: 'teacher',
age: 9
},
{
//JS delay function
const delay = ms => new Promise(resolve => setTimeout(resolve, ms))