2020-12-31

Port Forward using Ngrok

1. Visit
https://ngrok.com/
2. Download
https://ngrok.com/download
3. Register using unique key
4. Run
ngrok http 111 -host-header="localhost:1111"
5. Config
tunnels:
    proxy:
        proto: http
        addr: 8080
        host-header: localhost:8080
    gui:
        proto: tcp
        addr: 888
        host-header: localhost:888
x

2020-04-07

Highlight table row to highlight Episodes


<script>
    var episodeStringArray = ['S10E', 'S11E', 'S12E', 'S13E', 'S14E', 'S15E', 'S16E', 'S17E', 'S18E', 'S19E', 'S20E', 'S21E', 'S22E', 'S23E', 'S24E', 'S25E', 'E1', 'E01', 'E2', 'E02', 'E3', 'E03', 'E4', 'E04', 'E5', 'E05', 'E6', 'E06', 'E7', 'E07', 'E8', 'E08', 'E9', 'E09', 'E10', 'E11', 'E12', 'E13', 'E14', 'E16', 'E17', 'E18', 'E19', 'E20', 'E21', 'E22', 'E23', 'E24', 'E25', 'E26', 'E27', 'E28', 'E29', 'E30', 'EP1', 'EP01', 'EP2', 'EP02', 'EP3', 'EP03', 'EP4', 'EP04', 'EP5', 'EP05', 'EP6', 'EP06', 'EP7', 'EP07', 'EP8', 'EP08', 'EP9','EP09', 'EP10', 'EP11', 'EP12', 'EP13', 'EP14', 'EP16', 'EP17', 'EP18', 'EP19', 'EP20', 'EP21', 'EP22', 'EP23', 'EP24', 'EP25', 'EP26', 'EP27', 'EP28', 'EP29', 'EP30', 'EP31', 'EP32', 'EP33', 'EP34', 'EP35', 'EP36', 'EP37', 'EP38', 'EP39', 'EP40',' SP '];

    $('tr').each(function () {
        var title = $(this).text().toUpperCase();
        if (episodeStringArray.some(v => title.indexOf(v) > 1)) {
            $(this).css("background-color", "#F4F1F1 ");
            console.log(1);
        }
    })

</script>

2020-04-04

Add GreyMode for Site

CSS:

.greyMode {
    -moz-filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    filter: gray; /* IE6-9 */
    filter: grayscale(100%);
}


Homepage:

<html class="greyMode">

2019-10-28

Batch Rename File/Folder with C#

            // BATCH RENAME FOLDER
            System.IO.DirectoryInfo _dirAA = new System.IO.DirectoryInfo(@"C:\Users\rockymay\Downloads\ROCKY\xx\");
            foreach (System.IO.DirectoryInfo _dir in _dirAA.GetDirectories())
            {
               foreach(var _dir1 in _dir.GetDirectories())
                {
                    foreach (var _dir2 in _dir1.GetDirectories())
                    {
                        foreach (var _dir3 in _dir2.GetDirectories())
                        {
                            if (_dir3.Name.Contains("[BT-btt.com]"))
                            {

                                string _name = _dir3.Name.Replace("[BT-btt.com]", "");
                                string newpath = _dir2.FullName + "\\" + _name;
                                System.IO.Directory.Move(_dir3.FullName, newpath);
                                Console.Write("#");
                            }
                        }
                    }
                }
            }



            // BATCH RENAME FILE
            foreach (String filePath in Directory.GetFiles(@"C:\Users\rockymay\Downloads\ROCKY\xx\", "*.*", SearchOption.AllDirectories))
            {
                File.Move(filePath, filePath.Replace("[BT-btt.com]", ""));
                Console.Write("#");
            }

2019-10-01

Crop Image in C#

                //Crop Image to Proper Size

                var img = Image.FromFile("screenshot.png");
                Bitmap bmpImage = new Bitmap(img);
                Bitmap bmpCrop = bmpImage.Clone(new Rectangle(1370, 340, 200, 140), bmpImage.  //width distance, height distance,  new share width, new shape height
                PixelFormat);
                bmpCrop.Save("12.jpg");





2019-04-01

How to Avoid Disk100% for Utorrent

Follow these steps:

1. Make sure you are using uTorrent 2.2.1, because that's the most stable and most allowed torrent client on every torrent site. You can download it from http://utorrent.hu/download/utorrent-2-2-1-2/
2. Open the uTorrent settings (CTRL+P)
3. Tick the preallocate files button and untick all the updating and data sending related things
4. Go to advanced settings
5. Set bt.prio_first_last_piece to true
6. Set diskio.coalesce_write_size to 8388608
7. Set diskio.flush_files to false
8. Set diskio.sparse_files to true
9. Go to cache settings
10. Tick the override default cache, and set the cache size to 368MB
11. Apply and save the settings
12. After restarting uTorrent you will see way less or maybe absolutely no disk overload issues anymore



2018-12-10

Hide IISExpress/Run IIS Express at Background

create vbs file as :
-----
Dim App,Site 
Site = "BlogMVC"
If Len(Site) < 1 Then
    Site = WScript.Arguments(0)
End If
App = """%PROGRAMFILES%\IIS Express\iisexpress""" & _
          " /site:" & Site
If Len(Site) > 0 Then
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run App, 0
    Set WshShell = Nothing
End If
------



AND RUN!

Setup VNC on Ubuntu 20.04

  sudo apt update sudo apt install xfce4 xfce4-goodies sudo apt install tigervnc-standalone-server sudo apt install tightvncserver vncserver...