Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sitha Sek seksitha

🎯
Focusing
View GitHub Profile
@seksitha
seksitha / settting.json
Last active May 4, 2020
personal vscode user setting
View settting.json
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.metatdata.json": true,
"**/*.js.map": { "when": "$(basename)"},
"**/*.js": { "when": "$(basename).ts"}
//"**/*.html": { "when": "$(basename).pug"}
},
"window.zoomLevel": -0.8,
@seksitha
seksitha / apache2.conf
Created Mar 22, 2020
apache2.conf for ubuntu fresh install
View apache2.conf
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
@seksitha
seksitha / mysql_secure.sh
Created Feb 22, 2020 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
View mysql_secure.sh
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@seksitha
seksitha / index.html
Created Feb 12, 2020 — forked from mcxiaoke/index.html
detect app installed in browser
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!-- iframe used for attempting to load a custom protocol -->
<iframe style="display:none" height="0" width="0" id="loader"></iframe>
View clean.js
addDetail: (values, _, props) => {
//this syntax need to comply with redux form submit
console.log({ values });
const { saleType, saleDetail, products } = props;
if (!values.barcode) {
window.aLert("no barcode");
return { type: null };
}
// if you put only 3 digits nothing will match
// group capture with use question mark at the end capture to make it optional otherwise
View media-query.js
// '@media only screen and (min-width: 600px)': { // apply only width bigger than 600
// span: {
// display: 'none',
// },
// card: {
// maxWidth: "48%",
// marginRight:10,
// marginTop:15,
// },
// },
View click-track-link.txt
View bell_crontab
#Crontab -e
57 07 * * 1-5 python /home/pi/Documents/py_ball.py
55 08 * * 1-5 python /home/pi/Documents/py_ball.py
02 09 * * 1-5 python /home/pi/Documents/py_ball.py
00 10 * * 1-5 python /home/pi/Documents/py_ball.py
02 10 * * 1-5 python /home/pi/Documents/py_ball.py
00 11 * * 1-5 python /home/pi/Documents/py_ball.py
45 11 * * 1-5 python /home/pi/Documents/py_ball.py
35 12 * * 1-5 python /home/pi/Documents/py_ball.py
@seksitha
seksitha / docker.bash
Last active Mar 21, 2020
git command line
View docker.bash
// just the general docker command learned so foar
docker version
cocker info
docker container ls or docker ps // list container active
docker container ls -a // list all container
docker container run -it -p 80:80 nginx // ex create container nginx. run is to install create container from local cache or pull from hub. -it mean interactive ,
docker exec -it <CONTAINER_ID> bash // access command line of container
docker container rm 96a [id2] [id3] // to remove docker container is to docker rm <first-3digit-id-image-here>
You can’t perform that action at this time.