Skip to content

Instantly share code, notes, and snippets.

@souhaiebtar
souhaiebtar / charles key
Created January 13, 2020 14:33
[charles proxy key] an activation key #key #activation
// Charles Proxy License
// Registration code for any version of Charles, who would want to use a cracked version?
// Charles 4.5.5 is currently the latest version and is available.
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
Author: Neo Peng

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@younesbelkada
younesbelkada / finetune_llama_v2.py
Last active April 24, 2024 02:14
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@taurusxin
taurusxin / optimize.sh
Created October 30, 2022 18:59
Linux Optimization Script
#!/usr/bin/env bash
echo=echo
for cmd in echo /bin/echo; do
$cmd >/dev/null 2>&1 || continue
if ! $cmd -e "" | grep -qE '^-e'; then
echo=$cmd
break
fi
done
@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

@invictus-ir
invictus-ir / CloudTrail.csv
Last active April 24, 2024 02:12
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9. in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@peng-huang-ch
peng-huang-ch / encrypt.ts
Last active April 24, 2024 02:08
encrypt and decrypt the text using the password.
/**
* This file is used to encrypt and decrypt the text using the password.
* The password is used to derive the key using PBKDF2.
* The key is used to encrypt and decrypt the text using AES-GCM.
* The salt is used to derive the key using PBKDF2.
* The nonce is used to encrypt and decrypt the text using AES-GCM.
* The ciphertext is the encrypted text.
* The salt, nonce, and ciphertext are concatenated and converted to Base64.
* inspire by https://github.com/MetaMask/metamask-extension/blob/develop/app/scripts/controllers/user-storage/encryption.ts
*/
@sindresorhus
sindresorhus / esm-package.md
Last active April 24, 2024 02:07
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.