Skip to content

Instantly share code, notes, and snippets.

View ball6847's full-sized avatar
🎯
Focusing

Porawit Poboonma ball6847

🎯
Focusing
  • 7 Peaks Software Co., Ltd.
  • Bangkok, Thailand
View GitHub Profile
@ball6847
ball6847 / useful-keybindings.ahk
Created January 16, 2020 09:59
My autohotkey useful keybinding
#SingleInstance
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
XButton1::^#Right ; Go to next desktop
XButton2::^#Left ; Go to previous desktop
^!t::run, wt ; Open windows terminal
@ball6847
ball6847 / windows-apps.md
Last active October 7, 2019 04:42
List of Software I am using on Windows 10
@ball6847
ball6847 / profile.json
Last active September 26, 2019 09:34
My Personal Windows Terminal Configs
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"profiles": [
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
find src -name "*.jsx" -exec sh -c 'mv "$0" "${0%.jsx}.js"' {} \;
@ball6847
ball6847 / angular-practice.md
Last active August 5, 2018 15:30
My angular practice checklist

Best Practices

  • Do not leave console.log in your code unless it needed (for debugging in production).
  • Always remove unuseful comments.
  • Always provide Interface for both http request and response.
  • Avoid using namespace if possible.
  • Always remove unused imports.
  • Consider using separated component instead of inheritence (and configure it via Input or route data).
  • Limit usage for environment.ts to only in app.module.ts (use InjectionToken), this make your module flexibilty to move later in the future.
  • Consider configuring your api endpoint and default content type in HttpInterceptors instead of handling manually in services or components.
@ball6847
ball6847 / comfortable-swipe.conf
Created June 23, 2018 17:43
my config for comfortable-swipe.conf
# Comfortable Swipe converts touchpad swipe gestures to keyboard commands. You
# may edit this configuration file if you have different keyboard shortcuts
# that you would like to use. You can ignore a gesture by commenting out with
# a pound(#) symbol.
#
# Refer to https://www.linux.org/threads/xdotool-keyboard.10528/ for a list of
# keycodes you can use.
#################
# MISCELLANEOUS #
go build -gcflags "-m -m"
go test -gcflags "-m -m" -run none -bench BenchmarkLiteralFunctions -benchmem -memprofile mem.out
go tool pprof -alloc_space memcpu.test mem.out
go test -run none -bench . -benchtime 3s -benchmem -memprofile mem.out
go test -run none -bench AlgorithmOne -benchtime 3s -benchmem -memprofile mem.out
@ball6847
ball6847 / my-wrapper.component.ts
Created June 5, 2018 07:55
create component wrap form control
@Component({
selector: 'my-wrapper',
template: '<input ngDefaultControl>',
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => NumberInputComponent),
multi: true,
},
],
<?php
/**
* Created by: pckofstad
*/
$GITLAB_CI_TOKEN=
$REPO = "{user}/{project}
$REGISTRY_ID = 11111; // only way i found this was to inspect the calls done from the webpage
$TAGS_TO_WHITELIST = ['dev', 'master'];
@ball6847
ball6847 / .prettierrc
Created May 23, 2018 14:06
my prettierrc with angular
{
"$schema": "http://json.schemastore.org/prettierrc",
"parser": "typescript",
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false
}