Skip to content

Instantly share code, notes, and snippets.

View mchoiruln's full-sized avatar
🎯
Focusing

mchoiruln mchoiruln

🎯
Focusing
View GitHub Profile
@mchoiruln
mchoiruln / 0_reuse_code.js
Created November 2, 2016 02:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mchoiruln
mchoiruln / GetHostName.cs
Last active September 7, 2018 02:37
Information Computer #csharp #cmd
return Environment.MachineName;
@mchoiruln
mchoiruln / tweaks-sublime-italic-operator-mono.md
Created November 10, 2018 14:54 — forked from lavaldi/tweaks-sublime-italic-operator-mono.md
Operator Mono & Sublime Text 3 themes
  1. Install Package Resource Viewer.
  2. In package control window select ‘Package Resource Viewer: Open Resource’.
  3. Scroll down until you find the option: ‘Color Scheme — Default’ (or your theme with color scheme .tmTheme) and select it.
  4. Add the following
<!-- Operator Tweaks -->
  <dict>
    <key>name</key>
 Italic HTML attribute names
@mchoiruln
mchoiruln / Go Lang bookmark.md
Last active November 26, 2018 16:25
Just collection of Golang stuff
@mchoiruln
mchoiruln / Command.cmd
Last active January 24, 2019 10:09
Create empty file zero bytes from command prompt
COPY NUL "NEW TEXT FILE.txt"
@mchoiruln
mchoiruln / common issues.md
Last active May 20, 2024 06:59
List issues and solution

List known issues here

GIT

advanced Git Log Collection Command

git log --oneline --abbrev-commit --all --graph --decorate --color

Filename too long in windows

@mchoiruln
mchoiruln / mysqldump_command.md
Last active February 12, 2019 11:12
Dumping and importing from/to MySQL/MariaDb in an UTF-8 safe way

Dumping safely

cd to your backup dir first

mysqldump -uroot -p [database?] -r [name_dump_file?].dump
[enter password]

Importing a dump safely

@mchoiruln
mchoiruln / how.md
Last active February 20, 2019 15:01
Using port number for Windows host

SOURCE

I managed to achieve this by using Windows included Networking tool netsh.

The hosts file is for host name resolution only, so a combination of the two did the trick for me.

Example

Overview
@mchoiruln
mchoiruln / wallpaper-changer.sh
Created February 21, 2019 14:12
Manjaro Stuffs
while true; do
nitrogen --set-zoom --random ~/Bilder/Backgrounds
sleep 5m
done
# login with i3wm
# exec --no-startup-id /home/USER/bin/wallpaper.sh
# source
# https://forum.manjaro.org/t/changing-desktop-wallpaper-in-manjaro-i3/30935/3
@mchoiruln
mchoiruln / web.php.md
Last active March 8, 2021 17:46
PHPStorm complaints and solutions (Laravel 5.7 Projects)

Undefined variable $router

where : inside routes\web.php
solution : just add this comment on top that code or top of file after <?php

<?php
/** @var \Laravel\Lumen\Routing\Router $router */
$router->get('/', function () use ($router) {
    return $router->app->version();
});