Skip to content

Instantly share code, notes, and snippets.

View tps2015gh's full-sized avatar

Thitipong Samranvanich tps2015gh

  • Bangkok , Thailand
View GitHub Profile
@tps2015gh
tps2015gh / export_csv1.ps1
Last active August 2, 2023 10:40
# Export file names to CSV File (recursive) , PowerShell Script ( Tested in Windows10 )
# Export file names to CSV File (recursive)
# Microsoft Power Shell script
# For Compare 2 Folder
# Run command in Console line by line
$s1 = dir -r ./Folder1/
$s1 |ForEach-Object {
>> $files += [pscustomobject]@{
@tps2015gh
tps2015gh / a1_query_mysql_by_csharp_cli.txt
Last active August 6, 2019 19:21
connect mysql with C# , compile in csc.exe cli
:)
@tps2015gh
tps2015gh / canvas_01.js
Last active July 9, 2019 05:26
create canvas and draw small line javascript in debug console
// create canvas and draw small line
// tested in google chrome Develope
// about:blank
var canvas = document.createElement("canvas");
canvas.id = "mycanvas";
canvas.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml')
canvas.textContent = 'Drawing canvas is not supported'
@tps2015gh
tps2015gh / app.ts
Last active June 27, 2019 21:31
simulate ajax logon (Single Page )
"use strict";
exports.__esModule = true;
var title = "businss object";
var HttpSpace = /** @class */ (function () {
function HttpSpace() {
console.log("HTTP Space init ... OK");
}
return HttpSpace;
}());
exports.HttpSpace = HttpSpace;
@tps2015gh
tps2015gh / gist:c7d774e1512b15bf102c84355c21b107
Last active November 5, 2018 22:07
CHECK ng-include scope
https://embed.plnkr.co/BtR4rUEezfkD9zFmeMIn/
[https://embed.plnkr.co/BtR4rUEezfkD9zFmeMIn/](https://embed.plnkr.co/BtR4rUEezfkD9zFmeMIn/)
@tps2015gh
tps2015gh / test_angularJS.html
Created October 18, 2018 09:22
test_angularJS component
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<!--
I tested on : https://www.w3schools.com/code/tryit.asp?filename=FWCHCX5OSK4K
@author Thitipong Samranvanich
@tps2015gh
tps2015gh / _README
Last active October 8, 2018 18:41
Sample React communication between child and parent !!
this code I create + tested
on
https://codesandbox.io/s/14yyjqk1m3
it 's OK
since 2018-10-09
@tps2015gh
tps2015gh / mard_tra_11_and_12.ts
Last active October 4, 2018 17:07
มาตรา 11 และ มาตรา 12 ร่าง พรบ ความมั่นคงไซเบอร์แห่งชาติ
// class Person{
// constructor(param){
// this.idcard = param.idcard
// this.fullname = param.fullname
// }
// }
// @ts-check

git delete local branch

Delete a local and a remote GIT branch Delete a Local GIT branch. To delete the local GIT branch we can try one of the following commands: git branch -d branch_name. ... Delete a remote GIT branch. To delete a remote branch you can use the following command: git push <remote_name> --delete <branch_name> ... Push to remote branch and delete

  • git branch -d branch_name
  • git branch -D branch_name
@tps2015gh
tps2015gh / test_async_await.js
Last active April 11, 2020 12:34
javascript demo of using async/await keyword ( with Promise resolve setTimeout )
/**
* @author Thitipong Samranvanich
* @since 2561-09-05
* @param {*} ms
* @desc
* Demo ofy async / await keyword
*
*/
// ========================================================================================================