Skip to content

Instantly share code, notes, and snippets.

@ooltcloud
ooltcloud / SyncTimeNtp.ps1
Created December 5, 2018 10:50
Powershell と NTP を使用した簡易時刻同期 (udp の ntp プロトコル使用)
#--------------
# NTP 時刻合わせ (NTP UDP:123)
#--------------
# NTP 積算秒数の起点時刻 (JST)
$ntpEpoch = New-Object System.Datetime @(1900, 1, 1, 9, 0, 0)
# Big Endian の符号なし Int32 を取得
Function getUInt32BE($bytes, $startIndex) {
@mattmc3
mattmc3 / cd-ls.zsh
Created June 30, 2022 23:21
Zsh cd-ls
# 'ls' after every 'cd'
if ! (( $chpwd_functions[(I)chpwd_cdls] )); then
chpwd_functions+=(chpwd_cdls)
fi
function chpwd_cdls() {
if [[ -o interactive ]]; then
emulate -L zsh
ls
fi
}
@mattmc3
mattmc3 / piped_input_example.zsh
Created August 20, 2022 12:54
Zsh - append piped/redirected input to arg array
# Example to show how to append piped/redirected input to arg array
#
# More info:
# `man test` (lookup -t flag)
# `man zshbuiltins` (lookup set builtin)
#
# piped_input_example
# piped_input_example --flag arg
# piped_input_example --opt1 -x -y -z param1 param2 <<< "zzz"
# echo "abc" | piped_input_example --opt1 -x -y -z param1 param2
@adrianhajdin
adrianhajdin / chart.config.ts
Last active April 20, 2024 11:07
Build and Deploy a Full Stack MERN Dashboard App With CRUD, Auth, and Charts Using Refine
import { ApexOptions } from 'apexcharts';
export const TotalRevenueSeries = [
{
name: 'Last Month',
data: [183, 124, 115, 85, 143, 143, 96],
},
{
name: 'Running Month',
data: [95, 84, 72, 44, 108, 108, 47],
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 20, 2024 11:07
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@aamiaa
aamiaa / CompleteMokokoQuest.md
Last active April 20, 2024 11:06
Complete Discord Mokoko Quest

Complete Discord Mokoko Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@mattmc3
mattmc3 / auto_dircmd.zsh
Created September 15, 2022 12:22
Zsh auto_cd-like feature implementation
setopt no_auto_cd
function auto_dircmd {
# Run a command when PS1 contains a valid directory, similar to auto_cd
if [[ -d "$PWD/$BUFFER" ]] &&
(( ! $+functions[$BUFFER] )) &&
(( ! $+commands[$BUFFER] ))
then
BUFFER="ls \"./$BUFFER\""
fi
@mattmc3
mattmc3 / foo.zsh
Created February 3, 2023 01:38
Zsh collect args
# Collect args
# -- traditional, piped|, <redirected
function collect_args {
local data args=()
if [[ ! -t 0 ]]; then
while IFS= read -r data || [[ -n "$data" ]]; do
args+=("$data")
done
fi
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active April 20, 2024 11:01 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"