Skip to content

Instantly share code, notes, and snippets.

View faresyusuf's full-sized avatar

Fares Ibney Yusuf faresyusuf

View GitHub Profile

Keybase proof

I hereby claim:

  • I am faresyusuf on github.
  • I am fares071 (https://keybase.io/fares071) on keybase.
  • I have a public key ASBMq8-C9YVCJBaniBC_vxEn28GxjqviWjK9fujr80fxUQo

To claim this, I am signing this object:

@faresyusuf
faresyusuf / key.md
Created November 8, 2019 03:14
FREE IntelliJ IDEA key 2018.2!

READ or DIE

  • put 0.0.0.0 account.jetbrains.com into your hosts file (C:\Windows\System32\drivers\etc\hosts or /etc/hosts)
  • for GayOS macOS read that
  • use the key below
K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIy
@faresyusuf
faresyusuf / logstash.conf
Created September 27, 2018 01:46 — forked from markwalkom/logstash.conf
Reindexing Elasticsearch with Logstash 2.0
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
index => "INDEXNAME_HERE"
size => 1000
scroll => "5m"
docinfo => true
scan => true
}
@faresyusuf
faresyusuf / gist:afc9d9fa0c1b30eaf4bcdcce97e54147
Created September 12, 2018 20:08
delete files from remote which are mentioned in .gitignore file
git rm --cached `git ls-files -i --exclude-from=.gitignore`
git commit -m 'Removed all files that are in the .gitignore'
git push <your_remote> <your_branch>
@faresyusuf
faresyusuf / UsefulLinuxCommands.txt
Last active April 10, 2018 05:30
Useful Linux Commands
Dir size
du -sch ~/<FOLDER>/* | sort -rh
@faresyusuf
faresyusuf / gist:0e09f46bffe6b2f11cec2884617e7a14
Created February 21, 2018 20:48 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@faresyusuf
faresyusuf / Docker-delete-dangling-images.txt
Last active November 27, 2016 18:46
Docker-delete-dangling-images
1. remove dangling volume:
docker volume rm $(docker volume ls -qf dangling=true)
2. consider removing orphan images:
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
public static void login(String login)
{
Authentication authentication = Mockito.mock(Authentication.class);
// Mockito.whens() for your authorization object
Mockito.when(authentication.getPrincipal()).thenReturn(login);
SecurityContext securityContext = Mockito.mock(SecurityContext.class);
Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
SecurityContextHolder.setContext(securityContext);
}
@faresyusuf
faresyusuf / osx_install.sh
Created October 11, 2016 18:00 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@faresyusuf
faresyusuf / Sublime Text 3 Build 3103 License Key - CRACK
Created July 20, 2016 09:27
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04