Reset
You can reset the commit for a local branches using git reset
To change the commit of a local branch:
git fetch
git reset origin/master --hard
/* | |
Everyone on Stack Overflow does HTTP Basic Authentication on iOS by manually | |
building the HTTP headers. | |
This amounts to re-implementing HTTP. | |
Why? The Cocoa Touch URL Loading System aleady knows HTTP, and you can | |
configure your URLSession to supply HTTP Basic Authentication credentials | |
like so. |
#!/bin/bash | |
# | |
# 4633c8a2a16a8e0428d253baafb76bbc18f29562390c84d1c85ba98865531a2b | |
CRYPTER="base64 -b 78" | |
HEADER="----BEGIN PGP MESSAGE----" | |
FOOTER="-----END PGP MESSAGE-----" | |
do_encryption() { | |
local plain="$1" |
extension CVPixelBuffer | |
{ | |
/// Deep copy a CVPixelBuffer: | |
/// http://stackoverflow.com/questions/38335365/pulling-data-from-a-cmsamplebuffer-in-order-to-create-a-deep-copy | |
func copy() -> CVPixelBuffer | |
{ | |
precondition(CFGetTypeID(self) == CVPixelBufferGetTypeID(), "copy() cannot be called on a non-CVPixelBuffer") | |
var _copy: CVPixelBuffer? |
#!/bin/bash | |
# Give the usual warning. | |
clear; | |
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds..."; | |
sleep 10; | |
clear; | |
# Download and extract exploit files. | |
echo "[INFO] Downloading exploit files from GitHub..."; |
/* | |
* CVE-2016-5195 dirtypoc | |
* | |
* This PoC is memory only and doesn't write anything on the filesystem. | |
* /!\ Beware, it triggers a kernel crash a few minutes. | |
* | |
* gcc -Wall -o dirtycow-mem dirtycow-mem.c -ldl -lpthread | |
*/ | |
#define _GNU_SOURCE |
/* | |
* (un)comment correct payload first (x86 or x64)! | |
* | |
* $ gcc cowroot.c -o cowroot -pthread | |
* $ ./cowroot | |
* DirtyCow root privilege escalation | |
* Backing up /usr/bin/passwd.. to /tmp/bak | |
* Size of binary: 57048 | |
* Racing, this may take a while.. | |
* /usr/bin/passwd overwritten |
Reset
You can reset the commit for a local branches using git reset
To change the commit of a local branch:
git fetch
git reset origin/master --hard
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
#!/bin/bash | |
# Run this script just before you put the laptop in the bin for security scanning. | |
# You can add the seconds the laptop will be waiting before speaking. The default | |
# is waiting for 180 seconds (3 minutes). | |
# Switch to the login screen, effectively locking the screen. | |
function lockscreen() { | |
/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend | |
} |
import {Injectable, NgZone} from 'angular2/core'; | |
import {Http, Response, Headers} from 'angular2/http'; | |
import {Router} from 'angular2/router'; | |
import {tokenNotExpired} from 'angular2-jwt'; | |
import 'rxjs/add/operator/map'; | |
import {AppConfig} from '../services/config'; | |
declare var Auth0Lock: any; |