Skip to content

Instantly share code, notes, and snippets.

waleedsamy / ublockorigin_drop_alle_Scheiße_von_Facebook.js
Last active February 3, 2022 08:55
uBlockOrigin filters for Facebook Stories, Rooms, Contacts, Birthdays and Ads
View ublockorigin_drop_alle_Scheiße_von_Facebook.js
! No Stories, Rooms, Contacts, Birthdays and Ads[data-pagelet=Stories][data-pagelet=VideoChatHomeUnit][data-pagelet=RightRail][data-pagelet^="FeedUnit"]:has(a[aria-label="Sponsored"])[data-pagelet^="FeedUnit"]:has(:has-text(Suggested for You))
waleedsamy /
Last active August 2, 2023 10:01
How to fix SSL unable to verify the first certificate

Open an ssl connection to site

openssl s_client -connect


waleedsamy /
Created July 26, 2018 16:33
Run java/jmx in docker container and use visaulvm to mointor your app

I was testing an application (parser.jar) and need to limit the resource used by the app (cpu/ram) and see how different implmenation behaves.

docker run --rm -p 9010:9010 -it --memory=3000MB --cpus="2" java:8-jdk bash -c " java \
      -server \
      -XX:+UseG1GC \
      -XX:+UseStringDeduplication \
      -XX:+ExitOnOutOfMemoryError \
 -Xmx2g \
waleedsamy /
Last active July 16, 2018 16:45
Use AWK to add numbers from two files
awk 'FNR==NR{a[NR]=$1;next}{ print $0 " + " a[FNR] " = " $0+a[FNR]}' total-time-317.log total-time-330.log
waleedsamy / Jenkinsfile
Created October 17, 2017 16:14
Jenkinsfile that extract git info, build multi-stage docker image, push to nexus and deploy to kubernetes
View Jenkinsfile
node {
def rock
def branch
def commit
def nexussrv = ""
def nexussrv_office = "${nexussrv}:8843"
def nexussrv_datacenter = "${nexussrv}:9843"
waleedsamy / Dockerfile
Created October 13, 2017 11:27
Run docker inside Jenkins container
View Dockerfile
From jenkins
USER root
RUN apt-get update && apt-get install -y vim nano zsh curl git sudo
waleedsamy /
Created October 2, 2017 14:38
update my mp3's to have only the artist information
l=Bob\ Marley
find "$d" -type f -iname "*.mp3" -exec ls '{}' +
find "$d" -type f -iname "*.mp3" -exec mid3v2 -D '{}' +
find "$d" -type f -iname "*.mp3" -exec mid3v2 -l '{}' +
find "$d" -type f -iname "*.mp3" -exec id3tag --artist="$l" '{}' +
waleedsamy / bindasync.js
Created August 8, 2017 15:28
why bind async.js? because I can.
View bindasync.js
const async = require('async');
let ob = {
'x': 8,
'y': 16
function ci(callback) {
console.log('ci', this.x, this.y);
callback(null, 'berlin')
waleedsamy / git worktree
Created August 3, 2017 08:16
Run test for your project and continue working on the code in same time
View git worktree
git worktree add -b run-test-for-fix-bug-x ../fix-bug-x origin/fix-bug-x
rm -rf ../fix-bug-x && git worktree prune
waleedsamy / Function.scala
Created August 1, 2017 13:39
Function and PartialFunction Scala classes
View Function.scala
// func1 and func2 are synonyms
val func1 = (x: String) => "hello %s".format(x)
val func2 = new Function1[String, String] {
def apply(x: String) = "hello %s".format(x)