Skip to content

Instantly share code, notes, and snippets.

View ryuichi24's full-sized avatar

Ryuichi ryuichi24

View GitHub Profile
{
"console.log": {
"prefix": "clg",
"body": ["console.log($1)"]
},
"template for React Function Component": {
"prefix": "rf",
"body": [
"import React from 'react'",
"",
{ "key": "ctrl+j", "command": "workbench.action.terminal.focus" },
{
"key": "ctrl+j",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
@ryuichi24
ryuichi24 / graphql.json
Last active November 14, 2022 12:02
vscode snippets
{
// https://stackoverflow.com/questions/65846228/capitalize-first-letter-of-vscode-snippet
"template for mutation": {
"prefix": "mu",
"body": [
"input $1Input {",
"\t$2",
"}",
"",
"type $1Response {",
@ryuichi24
ryuichi24 / commands_sheet.md
Last active September 6, 2022 08:09
commands for linux

General

read file

less <file to path>

filter output

<some command> | grep <search input>

User management

add new user

adduser

@ryuichi24
ryuichi24 / BaseController.ts
Created May 28, 2021 08:04
base controller for typescript (node js)
import { HttpResponseBuilder } from './HttpResponseBuilder';
import { HttpStatusCode } from './HttpStatusCode';
import { Route } from './RouteBuilder';
abstract class BaseController {
protected _basePath: string;
protected _routes: Route[];
constructor() {
this._basePath = '';
@ryuichi24
ryuichi24 / dotnet_commands.md
Last active June 23, 2021 09:40
commands for dotnet cli

Dotnet Cli Commands

make a solution

dotnet new sln -n <solution name>

list project type names that can be created

dotnet new

make a project

dotnet new -n

@ryuichi24
ryuichi24 / nvm_commands.md
Created January 30, 2021 10:04
commands for NVM and some scripts for statup file

NVM Commands

show all node versions available for installing

nvm ls-remote

show all node versions already installed

nvm ls

install selected node

nvm install

@ryuichi24
ryuichi24 / easy_youtube-dl.sh
Created January 28, 2021 15:57
wrapper commands for youtube-dl
#!/bin/zsh
ydDir="$HOME/yd"
videoDir="$HOME/yd/videos"
musicDir="$HOME/yd/music"
# make yd directories if not exist
if [ ! -d "$ydDir" ]; then
mkdir "$HOME/yd"
mkdir "$videoDir"

Git commands

init local repository

git init

add changes to stage in the local

git add <files or directories>

add all changes in the local

git add .

@ryuichi24
ryuichi24 / terminal_commands_sheet.md
Last active January 29, 2021 20:21
list of terminal commands that are useful

Terminal Commands

display the name of files and subdirectories in the directory

ls

Change directory

cd <path>

make a new directory

mkdir