Skip to content

Instantly share code, notes, and snippets.

View yuyuvn's full-sized avatar
🍰

Clicia Scarlet (Phan Duc) yuyuvn

🍰
  • Money Forward
  • Tokyo, Japan
View GitHub Profile
@yuyuvn
yuyuvn / install-network-driver-truenas.md
Last active September 15, 2025 14:14
Step to install network driver for my truenas
  1. Insert kvm and usb-to-ethernet adapter
  2. Get IP of KVM from router (192.168.50.1)
  3. Access NAS via KVM
  4. Go to linux shell then run this command to unlock dev mode
/usr/local/libexec/disable-rootfs-protection
  1. Run this command to get adapter device id
ip link show | grep enx
@yuyuvn
yuyuvn / change_filament_noAMS_P1S_0.4nozzle_bambu_studiov2.0.3.54.gcode
Created June 2, 2025 08:54
gcode for orca slicer to print multi material with external spools. Should enable manual filament change config as well. I didn't test in bambu studio. Generated from https://github.com/eukatree/Bambu_CustomGCode
; change filament without AMS g-code
M204 S9000
{if toolchange_count > 1}
G17
G2 Z{z_after_toolchange + 0.4} I0.86 J0.86 P1 F10000 ; spiral lift a little from second lift
G1 Z{max_layer_z + 3.0} F1200
G1 X70 F21000
@yuyuvn
yuyuvn / gist:d5e87393534d02140af2fbeb0b8af743
Last active September 29, 2019 05:44
List keyword lái xe
車など -> tất cả phương tiện mặt đất
車 -> xe đạp, xe gắn máy, ô tô
自動車 -> ô tô, motor
徐行 -> đi tốc độ chậm
寄る -> tiến gần
踏む -> nhấn (ga/phanh)
合図 -> xi nhan
道路 -> làn
標識 -> biển báo
右端・左端 -> lề phải, lề trái
@yuyuvn
yuyuvn / powershell-web-server.ps1
Created June 5, 2018 16:34 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
function Load-Packages
{
param ([string] $directory = 'Packages')
$assemblies = Get-ChildItem $directory -Recurse -Filter '*.dll' | Select -Expand FullName
foreach ($assembly in $assemblies) { [System.Reflection.Assembly]::LoadFrom($assembly) }
}
Load-Packages
$routes = @{
```
rake app:update
```
check boot.rb
@yuyuvn
yuyuvn / beca.js
Last active April 8, 2018 13:03
Vietnam 11 grade assignment
function pushToGraph(graphIndex, source, i, j, stackCount) {
if (stackCount > 5000) {
return;
}
if (source[i][j] !== null && graphs[source[i][j]].ids.indexOf(graphIndex)==-1) {
mergeGraph(graphIndex, source[i][j])
return;
}
if (source[i][j] !== null) return;
source[i][j] = graphIndex;
@yuyuvn
yuyuvn / gh-pages-deploy.md
Created February 14, 2018 03:12 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@yuyuvn
yuyuvn / command.sh
Last active March 6, 2019 02:33
git command
git reflog
git branch --sort=committerdate
git cherry-pick -m 1 mycommitsha
rails generate controller --no-helper --no-assets --no-controller-specs --no-view-specs --no-decorator
```
C -> A - > B -> uncommit
git stash
git rebase -i C
@yuyuvn
yuyuvn / basic.github.expand.user.js
Last active July 28, 2017 04:58
Expand project columns
// ==UserScript==
// @name Expand project columns
// @namespace basicinc.github.projects.expand
// @description Expand project columns
// @include https://github.com/*/*/projects/*
// @version 1.0
// @grant none
// ==/UserScript==
document.querySelectorAll(".js-details-container").forEach(function(node){
@yuyuvn
yuyuvn / hide.spam.homeup.user.js
Last active May 23, 2017 12:36
Hide spam homeup
// ==UserScript==
// @name Hide homeup spam
// @namespace clicia.hide.homeup
// @include https://www.facebook.com
// @include https://www.facebook.com/*
// @version 1.1
// @grant none
// ==/UserScript==
function removeHomeup(){