Skip to content

Instantly share code, notes, and snippets.

View AhmedKamal20's full-sized avatar
🐧
Linuxing

Ahmed Kamal AhmedKamal20

🐧
Linuxing
View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active May 29, 2024 08:34
linux-setup.sh
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@thevtm
thevtm / gist:16511e71c9b21e69088579aa8c421412
Created November 27, 2020 15:51
Alacritty terminal drop down (Quake style) using tdrop and sxhkd
# https://github.com/alacritty/alacritty
# https://github.com/dancor/wmctrl
# https://github.com/baskerville/sxhkd
# https://github.com/noctuid/tdrop
super + z
tdrop -n top --width 100% --height 30% --post-map-hook 'wmctrl -r "Alacritty - Drop Down - Top" -b add,above,sticky' alacritty --title 'Alacritty - Drop Down - Top'
super + shift + z
tdrop -n bottom -y 64% --width 100% --height 30% --post-map-hook 'wmctrl -r "Alacritty - Drop Down - Bottom" -b add,above,sticky' alacritty --title 'Alacritty - Drop Down - Bottom'
@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@sk22
sk22 / lastfm-remove-duplicates.js
Last active January 13, 2024 16:26
Last.fm duplicate scrobble deleter
var elements = Array.from(document.querySelectorAll('.js-link-block'))
elements.map(function (element) {
var nameElement = element.querySelector('.chartlist-name')
return nameElement && nameElement.textContent.replace(/\s+/g, ' ').trim()
}).forEach(function (name, i, names) {
if (name !== names[i + 1]) return
var deleteButton = elements[i].querySelector('[data-ajax-form-sets-state="deleted"]')
if (deleteButton) deleteButton.click()
location.reload()
})
@akhal3d96
akhal3d96 / start_vpn.sh
Last active August 22, 2016 13:05
Quickly establish a connection with a free VPN server in USA in order to access Spotify's services
curl -o vpn.zip -s "https://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-US1.zip" && unzip vpn.zip -d ~/vpn_files && echo "vpnbook" > ~/.auth && curl -s "https://www.vpnbook.com/" | grep Password | tr -d '\t\n\r\f' | grep -Eo 'Password: [a-zA-Z0-9]*' | uniq | sed 's/Password: //' >> ~/.auth && sudo openvpn --config ~/vpn_files/vpnbook-us1-tcp443.ovpn --auth-user-pass ~/.auth
@elisemoe
elisemoe / notes.md
Last active July 17, 2021 00:27
Cucumber Step Definition - Useful Code and Comments

//scroll to the bottom of the page

((JavascriptExecutor) driver).executeScript("window.scrollTo(0, document.body.scrollHeight)");

Note: Do not upgrade Firefox browser version later than 40 - not compatible with latest Selenium Firefox Driver

Regex for a booking number: ^Ocean #BK+[0-9]{8}


@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

require 'nokogiri'
require 'open-uri'
# Get a Nokogiri::HTML:Document for the page we're interested in...
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove'))
# Do funky things with it using Nokogiri::XML::Node methods...
####
@jonlabelle
jonlabelle / strip_tag_attribs.md
Last active October 30, 2022 15:08
This Regular Expression removes all attributes and values from an HTML tag, preserving the tag itself and textual content (if found).

Strip HTML Attributes

<([a-z][a-z0-9]*)[^>]*?(/?)>
token explanation
< match < at beginning of tags
( start capture group $1 - tag name
[a-z] match a through z
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.