Skip to content

Instantly share code, notes, and snippets.

Steps:

  • Add Activation Code
  • Click Manage Proxy
  • Click Manual proxy
  • Add localhost in hostname

Activation Code:

I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIj

@ciiqr
ciiqr / zod-optional-null.ts
Last active May 13, 2024 11:12
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{
@githubfoam
githubfoam / windows event logs cheat sheet
Last active May 13, 2024 11:10
windows event logs cheat sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# PS : ChatGPT makes mistakes, consider "trust but verify" principle
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Events to Monitor
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#run
eventvwr.msc Event viewer
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event Viewer(Local)-Windows Logs (shutdown / restart )
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 13, 2024 11:10
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Get-ChildItem -Path $folderPath -File -Recurse | Where-Object { $_.Extension -eq ".html" } | ForEach-Object {
$fileName = $_.Name
$fileCounts = @{}
$content = Get-Content -Path $_.FullName -Raw
foreach ($searchString in $searchStrings) {
$occurrences = ($content | Select-String -Pattern $searchString -AllMatches).Matches.Count
$fileCounts[$searchString] = $occurrences
}
@al1gned
al1gned / count.ps1
Created June 13, 2023 11:19
blah blah
$folderPath = Get-Location
$searchStrings = @("</div>", "</h5>", "</h1>", "</a>", "</p>", "</table>", "</td>", "</tr>", "</th>", "<br>", "<img", "</address>")
Get-ChildItem -Path $folderPath -File -Recurse | Where-Object { $_.Extension -eq ".html" } | ForEach-Object {
$fileName = $_.Name
$fileCounts = @{}
$content = Get-Content -Path $_.FullName -Raw
foreach ($searchString in $searchStrings) {
$occurrences = ($content | Select-String -Pattern $searchString -AllMatches).Matches.Count
$fileCounts[$searchString] = $occurrences
@srugano
srugano / noroot_tcpdump.sh
Created October 9, 2021 12:23
Enable tcpdump for non-root users on Debian/Ubuntu.
#!/usr/bin/env bash
# NOTE: This will let anyone who belongs to the 'pcap' group
# execute 'tcpdump'
# NOTE2: User running the script MUST be a sudoer. It is
# convenient to be able to sudo without a password.
sudo groupadd pcap
sudo usermod -a -G pcap $USER
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
contract Money {
struct People{
uint id;
string name;
uint amount;
}
mapping (uint => People) public peoples;
event votedEvent(uint indexed _candidateId);
@Tset-Noitamotua
Tset-Noitamotua / cucumber_to_robotframework.md
Last active May 13, 2024 11:06
HOW TO translate Cucumber test case into Robot Framework (RF) test case

Cucumber test with examples table

Scenario Outline: eating cucumbers
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |  12   |  5  |  7   |
@quad
quad / 0-modular-errors-with-rusts-thiserror.md
Last active May 13, 2024 11:05
Modular Errors with Rust's thiserror

I've been writing Rust full-time with a small team for over a year now. Throughout, I've lamented the lack of clear best practices around defining error types. One day, I'd love to write up my journey and enumerate the various strategies I've both seen and tried. Today is not that day.

Today, I want to reply to a blog post that almost perfectly summarised my current practice.

Go read it; I'll wait!