Skip to content

Instantly share code, notes, and snippets.

Goal CSS 3 XPath
All Elements * //*
All P Elements p //p
All Child Elements p>* //p/*
Element By ID #foo //*[@id=’foo’]
Element By Class .foo //*[contains(@class,’foo’)]
Element With Attribute *[title] //*[@title]
First Child of All P p>*:first-child //p/*[0]
All P with an A child Not possible //p[a]
Next Element p + * //p/following-sibling::*[0]
@sultanshakir
sultanshakir / iterm2-solarized.md
Created September 5, 2017 15:13 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@sultanshakir
sultanshakir / README.md
Created January 17, 2017 02:40 — forked from ngryman/README.md
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.
@sultanshakir
sultanshakir / scope-watch.htm
Created January 10, 2016 14:22 — forked from bennadel/scope-watch.htm
Understanding How To Use $scope.$watch() With Controller-As In AngularJS
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Understanding How To Use $scope.$watch() With Controller-As In AngularJS
</title>
<link rel="stylesheet" type="text/css" href="./demo.css"></link>
@sultanshakir
sultanshakir / pre-commit
Last active August 29, 2015 14:27
Pre-commit database dump
#!/bin/sh
mysqldump -u [mysql user] -p[mysql password] --skip-extended-insert [database] > /path/to/your/repo/[database].sql
cd /path/to/your/repo
git add [database].sql