Skip to content

Instantly share code, notes, and snippets.

View mdimai666's full-sized avatar
🏠
Working from home

mdimai666 mdimai666

🏠
Working from home
View GitHub Profile
@mdimai666
mdimai666 / .conkyrc
Created January 10, 2020 21:59
System monitor Conky settings file
conky.config = {
alignment = 'top_right',
background = false,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'cornflowerblue',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
//docker-build.ps1
docker build --rm -f "Dockerfile" -t mdimai666/doc1:latest "."
//docker-run.ps1
docker rm node1 -f
docker run --rm -d -p 3000:3000/tcp --name node1 mdimai666/doc1:latest
//scripts
"scripts": {
"dockerbuild": "pwsh docker-build.ps1",
@mdimai666
mdimai666 / vscode-python-workspace-integrateVenvForIntellisense.json
Last active December 28, 2019 01:45
VSCode include intellisense if use venv
{
"python.pythonPath": "${workspaceFolder}/../venv/Scripts/",
"editor.formatOnSave": true,
"python.autoComplete.extraPaths": [
"${workspaceFolder}/../venv/Lib/site-packages/"
]
}
@mdimai666
mdimai666 / launch-python-vscode-djangoRunserver.json
Created December 28, 2019 01:42
VSCode run django from F5 debug mode with venv
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: RunServer",
"type": "python",
"request": "launch",
"pythonPath": "${workspaceFolder}/../venv/Scripts/python.exe",
"program": "${workspaceFolder}/src/manage.py",
"console": "integratedTerminal",
$i=0; gc .\list.txt | %{ $i++; echo $i; Invoke-WebRequest $_ -OutFile "path\$(([string]$_).Substring($_.LastIndexOf("/") + 1))" }
[{"id":"1e4e1d88.47bf62","type":"function","z":"2c7f1a63.3deb96","name":"init loop","func":"let id = 1;\nmsg[`loop_array${id}`] = msg.payload;\nmsg[`loop_array_count${id}`] = msg.payload.length;\nmsg[`loop_array_save${id}`] = msg.payload;\nmsg[`loop_dt_start${id}`] = new Date();\n\n\nreturn msg;","outputs":1,"noerr":0,"x":527.5,"y":426,"wires":[["91d5e42.980dc18"]],"icon":"node-red/cog.png"},{"id":"91d5e42.980dc18","type":"function","z":"2c7f1a63.3deb96","name":"loop","func":"let id = 1;\n\nif(msg[`loop_array${id}`].length<1)\n return [null,msg];\n \nmsg[`loop_current${id}`] = msg[`loop_array${id}`].shift();\nmsg.payload = msg[`loop_current${id}`];\nvar count = msg[`loop_array_count${id}`];\nvar ii = count-msg[`loop_array${id}`].length;\nnode.status({text:`${ii}/${count}`})\n\nreturn [msg]","outputs":2,"noerr":0,"x":690,"y":420,"wires":[[],[]],"outputLabels":["iteration","end"],"icon":"node-red/cog.png"}]
@mdimai666
mdimai666 / Unity3d TextMeshPro Cyrillic
Created July 11, 2019 09:59
How generate Cyrillic assets
I use:
1. Window/ TextMeshPro/ FontCreator
3. Use Cyrillic support font from google
4. Set
- Sampling point size: auto
- Atlas resolution: 1024
- Character set: Cusom charactes:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ?…АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя
abdelaziz18003.quasar-snippets
abusaidm.html-snippets
alefragnani.numbered-bookmarks
amandeepmittal.pug
brapifra.phpserver
dbaeumer.jshint
dbaeumer.vscode-eslint
donjayamanne.githistory
DotJoshJohnson.xml
eventyret.bootstrap-4-cdn-snippet
@mdimai666
mdimai666 / includefile.php
Created July 22, 2018 14:40
wordpress include file shortcode
//current child theme path
//get_stylesheet_directory();
//get_stylesheet_directory_uri() - url
// echo TEMPLATEPATH; - parent theme papth
// echo ABSPATH; - absolute
// ALL in work in hook inner only!!!
//[include filepath="pagecalc1.php"]
function include_file($atts) {
//if filepath was specified
[
{
"id": "1f26139b.0b994c",
"type": "debug",
"z": "fc469f5.4b34b6",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,