Skip to content

Instantly share code, notes, and snippets.

@seachai
seachai / gist:948ed1eeafa32ce03db6685edb879f71
Last active May 8, 2024 11:03
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →
- Move to the start of the line using fn + ← and to the end of the line with fn + →.
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask:
brew cask reinstall iterm2
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 11:01
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@blessochampion
blessochampion / font-awesome-svg.json
Created May 4, 2019 09:53
Font Awesome JSON. Maps icon name to its SVG.
This file has been truncated, but you can view the full file.
{
"fas fa-ad": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z\"/></svg>",
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 8, 2024 10:57
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
@Koze
Koze / NoFadeTiledView.h
Created July 17, 2016 16:15
Remove fade animation of CATiledLayer.
@interface NoFadeTiledView : UIView
@end
@interface NoFadeTiledLayer : CATiledLayer
@end
@ayebrian
ayebrian / vmware.md
Last active May 8, 2024 10:56
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

vCenter Server 7

Key Tested
@64lines
64lines / google_tricks.txt
Last active May 8, 2024 10:56
Master Google Tricks
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www" domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
import numpy as np
class HashTable:
def __init__(self, hash_size, inp_dimensions):
self.hash_size = hash_size
self.inp_dimensions = inp_dimensions
self.hash_table = dict()
self.projections = np.random.randn(self.hash_size, inp_dimensions)
def generate_hash(self, inp_vector):
@MartinHBA
MartinHBA / Microsoft.Data.SqlClient.md
Last active May 8, 2024 10:55
Microsoft.Data.SqlClient with PowerShell

Microsoft.Data.SqlClient with PowerShell

This is step by step guide how to use new .NET namespace Microsoft.Data.SqlClient with Powershell. I've tested connection string using SQL login and Windows login. This could not fit you all but might provide you some ideas.

Scenario

Fresh Windows Server 2016 in my case Azure VM.

  1. Install .NET CORE 3.0 SDK it must be SDK