Skip to content

Instantly share code, notes, and snippets.

View crazyyy's full-sized avatar

Vitalii Antoniuk crazyyy

View GitHub Profile
@crazyyy
crazyyy / _readme.md
Last active July 5, 2024 17:38
☄️ #pwsh Favorit Snipps #powershell

☄️ Powershell #pwsh Favorit Snipps

Docs

An A-Z Index of Windows PowerShell commands https://ss64.com/ps/

Restart WSL services

Get-Service LxssManager | Restart-Service
@crazyyy
crazyyy / _readme.md
Last active February 29, 2020 20:57
🔐 #ssh Favorit Snipps

Copying your Public Key Using SSH

cat ~/.ssh/id_rsa.pub | ssh username@remote_host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

To start the SSH Agent, type the following into your local terminal session:

eval $(ssh-agent)
@crazyyy
crazyyy / .jshintrc
Last active October 2, 2021 16:27
🤷 #js #javascript Favorit Snipps
{
"camelcase": true,
"indent": 2,
"undef": true,
"quotmark": false,
"maxlen": 120,
"trailing": true,
"curly": true,
"strict": false,
"browser": true,
@crazyyy
crazyyy / gist_markdown_examples.md
Created February 22, 2020 00:14 — forked from ww9/gist_markdown_examples.md
#md || Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@crazyyy
crazyyy / _readme.md
Last active September 20, 2023 23:44
📯 #cmd #pwsh #powershell Favorit Snipps

Windows #cmd favorite snippets

add to autorun

add the full command in registry with this command as administrator*

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /V VcxSrv /D "C:\apps\apps\vcxsrv\current\vcxsrv.exe :0 -multiwindow -clipboard -wgl"

# Run the server in multiwindow mode.
@crazyyy
crazyyy / index.js
Created December 10, 2019 17:33
#postman #js #debug
const response = JSON.parse(responseBody)
const response_length = response.length;
console.log(response_length)
console.log(response)
@crazyyy
crazyyy / _readme.md
Last active June 26, 2021 20:21
🤸 #php Favorite Snippets

PHP Snippets

@crazyyy
crazyyy / another.php
Last active October 30, 2023 11:51
[💦 ACF Fake Field] ACF Fake Field Generator #php #wp #acf
<?php
// /*
function rand_float($st_num=0,$end_num=1,$mul=1000000) {
if ($st_num>$end_num) return false;
return mt_rand($st_num*$mul,$end_num*$mul)/$mul;
}
$query_args = array(
'post_type' => 'product',
'post_status' => 'publish',
@crazyyy
crazyyy / _readme.md
Last active February 2, 2022 06:39
#php #wp #acf wordpress loop posts and update ACF fields

PHP favorite snippets

Enable logging

declare(strict_types=1);

ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
@crazyyy
crazyyy / index.html
Created January 10, 2019 20:21
#js || defer load / running javascript code
<script>
window.addEventListener('DOMContentLoaded', function() {
(function($) {
//do something with b-lazy plugin, lightbox plugin and then with flexslider
})(jQuery);
});
</script>