Skip to content

Instantly share code, notes, and snippets.

alpsayin / bloomberg_maximise_chart_bookmarklet.js
Created December 29, 2021 13:20
Copy this into bookmarkfield to create a bookmarklet that maximises the currency/stock chart upon page load in bloomberg
javascript: (function () {
console.log("bookmarklet init");
let maximiseArr = document.getElementsByClassName('maximize__4aa51a4e26');
if (maximiseArr.length > 0) {
window.addEventListener("load", function () {
console.log("onload init");
(new MutationObserver(function (c) {
c.forEach(function (a) {
alpsayin / dekunu_jumplog_excel_macros.bas
Last active May 3, 2022 20:56
Dekunu Jump Log Excel Macros
Attribute VB_Name = "DekunuJumpLogMacros"
Sub Range_End_Method()
'Finds the last non-blank cell in a single row or column
Dim lRow As Long
Dim lCol As Long
'Find the last non-blank cell in column A(1)
lRow = Cells(Rows.Count, 1).End(xlUp).Row
from pathlib import Path
from argparse import ArgumentParser
from typing import Tuple, List
from datetime import datetime
g_max_depth_traversed = 0
g_last_mtime = 0
### Setup Instructions
#you need root, need I say it?
#disable DNSMASQ by commenting out the below line in /etc/NetworkManager/NetworkManager.conf
# dns=dnsmasq
#if it's different for any reason, establish the usual resolvconf link with
# ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
#so that ls -l /etc/resolv.conf is as below
# /etc/resolv.conf -> /run/resolvconf/resolv.conf
alpsayin / FB-RemoveSponsored.user.js
Last active January 9, 2018 13:24
Hide/remove facebook suggested sponsored posts that appear in your feed by searching for non-timestamped posts
// -*- Mode: Javascript; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 2 -*-
(C)2017+ Alp Sayin
Authors: Alp Sayin <>
This work is licensed under a Creative Commons License !
// ==UserScript==
// @name FB-Remove Sponsored Posts
response=`/usr/bin/curl --silent --user-agent 'CustomCurlUpdaterFromMyRasPi/1.0' 'https://'$username':'$password''$hostname`
alpsayin / messengerBasketballHack.bat
Last active March 25, 2016 17:30
A small windows batch script to autoaim Facebook Messenger's hidden basketball game. Requires adb bridge. Open Messenger, start a game and run this script.Touch the ball and it will automatically make the perfect swipe to shoot the ball into the hoop. Tested on Oneplus One, Cyanogenmod 13.
set index=1
if %index% gtr 10000 goto EndWHile
echo Iteration number %index%
set /A index+=1
Rem set /p xIndex=Enter X Index:
adb shell "getevent -lc 16 /dev/input/event0 | grep ABS_MT_POSITION_X | awk '{print $3}' | (read string; echo $((16#$string)))" > touch_location.txt
set /p xIndex=<touch_location.txt
echo %xIndex%
alpsayin /
Created June 17, 2015 17:44
Shell Script to check if a process is running and do actions accordingly
# Alp Sayin
# 17/06/2015
while true
result=`ps aux | grep "tomcat6" | grep -v grep | grep -v ""`
# echo $result
if [ -z "$result" ];
alpsayin /
Created June 17, 2015 17:40
OpenWrt WhoIsHome Script
# OpenWrt whoIsHome script
# Alp Sayin
# 17/06/2015
echo `date`
alpsayin / eject_cdroms.bat
Last active August 29, 2015 14:23
Nircmd Auto-Eject All Cdroms
REM Alp Sayin
REM 17/06/2015
set disks="wmic logicaldisk | findstr "CD-ROM Disc""
for /F "tokens=2" %%a in (' %disks% ') do nircmd.exe cdrom open %%a