Skip to content

Instantly share code, notes, and snippets.

View saltukalakus's full-sized avatar
🐢
Rust & Cryptography

saltukalakus

🐢
Rust & Cryptography
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In with Auth0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
@saltukalakus
saltukalakus / index.html
Last active June 2, 2025 20:38
Lock11 with Kerberos hosted auto login without button
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In with Auth0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
function (user, context, callback) {
var deviceFingerPrint = getDeviceFingerPrint();
user.app_metadata = user.app_metadata || {};
if (user.app_metadata.lastLoginDeviceFingerPrint !== deviceFingerPrint) {
user.app_metadata.lastLoginDeviceFingerPrint = deviceFingerPrint;
context.multifactor = {
var crypto = require('crypto');
function base64URLEncode(str) {
return str.toString('base64')
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=/g, '');
}
var verifier = base64URLEncode(crypto.randomBytes(32));
@saltukalakus
saltukalakus / gist:1b3c4815a1bad7da51b98a38446dbab6
Created March 24, 2017 00:18 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@saltukalakus
saltukalakus / gist:a11ef96fbad46c46516dc2ddf1d42da5
Created March 24, 2017 00:18 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

function (user, context, callback) {
var userApiUrl = auth0.baseUrl + '/users';
function isSocial() {
return user.identities[0].isSocial;
}
function deleteSocialUser(user) {
if (isSocial()){
@saltukalakus
saltukalakus / unfollow.py
Created January 15, 2017 01:23 — forked from perpetual-hydrofoil/unfollow.py
Twitter Unfollow Example (python)
#! /usr/bin/env python
# how to unfollow everyone who isn't following you
# By Jamieson Becker (Public Domain/no copyright, do what you will)
# Easy instructions, even if you don't know Python
#
# 1. Install pip (apt-get install python-pip) and then
# pip install tweepy, which is the python twitter client
#
@saltukalakus
saltukalakus / delete_all_tweets.py
Created January 15, 2017 01:22 — forked from vik-y/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script is forked originally from Dave Jeffery. The original implementation
was very slow and deleted around 2 tweets per second. Making it multithreaded I
am able to delete 30-50 tweets per second.
@author: vik-y
----------------------------------------------------------------------------
This script will delete all of the tweets in the specified account.
@saltukalakus
saltukalakus / get_quertdtring_value.js
Created October 23, 2016 18:12
Helper to get a querystring value.
/*
* Helper to get a querystring value.
*/
function getParameterByName( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";