Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 26, 2024 12:21
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bkonkle
bkonkle / createurls.py
Created September 18, 2012 22:00
A script to create urls for Jmeter testing from your Apache access logs.
#!/usr/bin/env python
"""
Requires apachelog. `pip install apachelog`
"""
from __future__ import with_statement
import apachelog
import csv
import re
import sys
from optparse import OptionParser
@rxaviers
rxaviers / gist:7360908
Last active July 26, 2024 06:58
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@paulirish
paulirish / what-forces-layout.md
Last active July 25, 2024 07:49
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@subfuzion
subfuzion / curl.md
Last active July 25, 2024 08:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@vinayakg
vinayakg / cloudSettings
Last active March 2, 2022 12:14
Visual Studio Code Settings Sync
{"lastUpload":"2021-12-12T18:16:37.310Z","extensionVersion":"v3.4.3"}
@vinayakg
vinayakg / install-m1.rb
Last active March 2, 2022 12:15 — forked from skyl/install.rb
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
if ARGV.length < 1
puts "Too few arguments, please include the folder name to install your packages there"
exit
end
@vinayakg
vinayakg / brew-cask-m1.txt
Last active July 14, 2024 12:06
Brew cask packages
android-ndk
android-platform-tools
android-sdk
android-studio
appcleaner
arduino
cloudflare-warp
coteditor
dbeaver-community
docker
@vinayakg
vinayakg / find-address-live-traffic.sh
Last active March 24, 2024 14:23
find ip address and their location from live traffic on machine
lsof -iTCP -P | grep Spark | awk '{print $9}' | cut -d '>' -f2 | cut -d ':' -f1 | uniq | xargs -I% curl ipinfo.io/%/org
@vinayakg
vinayakg / linux-commands.sh
Last active March 24, 2024 14:24
Handy Linux commands that have been using for years
Find files size excluding folders in the current directory
`find . -name "*.*" -type f -depth 1 -exec du -ch {} +`
Batch file to delete files older than N days
`forfiles -p "C:\what\ever" -s -m *.* -d <number of days> -c "cmd /c del @path"`
Running a batch program in one line