This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var weinre_script = document.createElement("script"); | |
weinre_script.type = "text/javascript"; | |
weinre_script.src = "http://xxx.xx.xx.xx:8855/target/target-script-min.js#anonymous"; | |
var head = document.getElementsByTagName('head')[0]; | |
head.appendChild(weinre_script); | |
// replace xxx with IP adress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hex64: function(hex) { | |
function encodeHex(s) { | |
s = s.substring(1, 7); | |
if (s.length < 6) { | |
s = s[0] + s[0] + s[1] + s[1] + s[2] + s[2]; | |
} | |
return encodeRGB( | |
parseInt(s[0] + s[1], 16), parseInt(s[2] + s[3], 16), parseInt(s[4] + s[5], 16)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.ssh/id_rsa.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND + ALT + [ | |
COMMAND + ALT + ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reset the current branch to the commit just before the last 12: | |
git reset --hard HEAD~12 | |
# HEAD@{1} is where the branch was just before the previous command. | |
# This command sets the state of the index to be as it would just | |
# after a merge from that commit: | |
git merge --squash HEAD@{1} | |
# Commit those squashed changes. The commit message will be helpfully | |
# prepopulated with the commit messages of all the squashed commits: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Know how fast your HTML Imports are | |
var imports = document.querySelectorAll('link[rel="import"]'); | |
[].forEach.call(imports, function(link) { | |
var entries = performance.getEntriesByName(link.href); | |
console.info('=== HTML Imports perf ==='); | |
entries.forEach(function(e) { | |
console.log(e.name, 'took', e.duration, 'ms'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo shutdown -r now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 == --- == no access | |
1 == --x == execute | |
2 == -w- == write | |
3 == -wx == write / execute | |
4 == r-- == read | |
5 == r-x == read / execute | |
6 == rw- == read / write | |
7 == rwx == read / write / execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Include path to executable "C:\Program Files\Sublime Text 2\" in your PATH, and then run an administrator command prompt: | |
cd "C:\Program Files\Sublime Text 2\" | |
mklink sublime.exe sublime_text.exe | |
That will make a symbolic link with the new name. And now you can use it freely: | |
sublime hello.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub fillBlankGUIDs() | |
For Each c In Selection | |
If IsEmpty(c.Value) Then c.Value = Mid$(CreateObject("Scriptlet.TypeLib").GUID, 2, 36) | |
Next | |
End Sub |
NewerOlder