Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
var Bar1 = base => class extends base {
componentWillMount(){
super.componentWillMount();
console.log('Bar1');
}
};
var Bar2 = base => class extends base {
componentWillMount(){
super.componentWillMount();
@rafaell-lycan
rafaell-lycan / prevent-enter-submit.js
Created January 28, 2015 22:28
AngularJS - Prevent Enter Submit Directive
angular.module('app',[])
.directive('preventEnterSubmit', function () {
return function (scope, el, attrs) {
el.bind('keydown', function (event) {
if (13 == event.which) {
event.preventDefault(); // Doesn't work at all
window.stop(); // Works in all browsers but IE...
document.execCommand('Stop'); // Works in IE
return false; // Don't even know why it's here. Does nothing.
}
#!/bin/bash
# make a new directory to work in
cd ~/Desktop && mkdir nexus501
# get the OTA
wget http://android.clients.google.com/packages/ota/google_hammerhead/785a2f7af3718dba7e569decde8b6c4dc476a309.signed-hammerhead-LRX22C-from-LRX21O.785a2f7a.zip
mv *.zip update.zip
# get the flashable super su
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active November 1, 2023 08:35
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
@eyecatchup
eyecatchup / secure_flashing_hammerhead_lrx21o.txt
Created November 13, 2014 11:40
The safest way to flash factory images - This is a manual step-by-step procedure to flash Android 5.0 (LRX21O) factory images onto the Nexus 5 (aka hammerhead).
# Create a new working directory and cd into it
~$ mkdir -p /path/n5update && cd /path/n5update
# Download all files you need
/path/n5update$ wget --no-check-certificates https://dl.google.com/dl/android/aosp/hammerhead-lrx21o-factory-01315e08.tgz
/path/n5update$ wget --no-check-certificates https://copy.com/pV8d7OdciGi2EUQu/openrecovery-twrp-2.8.1.0-hammerhead.img
# @chainfire: I really hope it's not too cheeky, I just so wanted a hotlink for this one. :| As soon as you ask, it's gone.
/path/n5update$ wget --no-check-certificates https://copy.com/spuYd3VhHiAULMCL/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip
# Extract downloaded file archives
@eyecatchup
eyecatchup / disable_whatsapp_read_receipts.sh
Last active April 7, 2021 20:57
Shell script to disable read receipts for all your incoming Whatsapp messages. [ANDROID-ONLY]
#!/system/bin/sh
################################################################################
#
# Shell script to disable read receipts for all incoming Whatsapp messages.
#
# [ ANDROID AND ROOT ONLY ! ]
#
# Author: Stephan Schmitz <[email protected]>
# Source: https://gist.github.com/eyecatchup/9af90363732801b131bf
# Last Updated: 09. Nov 2014
@eyecatchup
eyecatchup / setlogprops.sh
Last active May 24, 2016 09:10
Shell script to use on Android systems to enforce VERBOSE logging for a bunch of system-relevant internal services / processes. (Needs to be executed with root permissions!)
#!/system/xbin/sh
#LEVEL=$1
LEVEL="VERBOSE"
PROPS="
AndroidRuntime
ActivityManager
ActivityThread
PackageManager
@eyecatchup
eyecatchup / colors_material.xml
Last active June 27, 2021 23:18
Android L Material Color Specs
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@irnnr
irnnr / README.md
Last active October 2, 2015 02:14
TYPO3 Dynamic Return Type code completion
@eyecatchup
eyecatchup / get-win7-productkey.vbs
Created August 16, 2014 15:52
VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
' VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
'
' Save the VBScript as "getWin7Key.vbs" somewhere on your Windows7 PC.
' Now, when you double-click the local script file an alertbox pops up
' displaying the product key stored in the machine's Windows registry.
Set WshShell = WScript.CreateObject("WScript.Shell")
KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
MsgBox ExtractKey(WshShell.RegRead(KeyPath))