Skip to content

Instantly share code, notes, and snippets.

View palaniraja's full-sized avatar

palaniraja palaniraja

View GitHub Profile
@palaniraja
palaniraja / history-diff.js
Last active April 12, 2024 22:43
jira desc history diff - quick hack
var hItems = document.querySelectorAll("div[data-testid='issue-history.ui.history-items.generic-history-item.history-item']")
var desc = hItems[1]
if (hItems.length < 1) {
alert("switch to history tab and re-run")
return
}
else {
Array.from(hItems).forEach(function (desc, idx){
if (desc.childNodes.length > 1 ){
prof = desc.childNodes[0]
@palaniraja
palaniraja / url.txt
Last active April 11, 2024 07:56
Chennai FM Radio stations streaming urls
Source: https://www.tamilradios.com
Hello FM 106.4
http://163.172.158.94:8048/;stream.mp3
Radio Mirchi FM 98.3
http://163.172.158.94:8052/;stream.mp3
Big FM 92.7
@palaniraja
palaniraja / ublock - youtube.txt
Last active January 24, 2024 22:52
ublock origin - youtube cosmetics
# youtube cosmetics
www.youtube.com###logo-icon > .yt-icon.style-scope > .yt-spec-icon-shape > div
www.youtube.com###masthead-container:style(opacity:0.25)
www.youtube.com###top-row:style(opacity:0.25)
www.youtube.com##ytd-comments-header-renderer:style(opacity:0.25)
www.youtube.com###secondary:style(opacity:0.25)
www.youtube.com###description:style(opacity:0.25)
www.youtube.com###sections:style(opacity:0.25)
@palaniraja
palaniraja / smsme.scpt
Created August 19, 2011 14:40
Applescript to send SMS (text) message when it receive an email on my office outlook.
(*
SMS me when new mail arrived.
Based on http://mattgemmell.com/using-growl-with-microsoft-outlook + SMS API from http://www.thekirankumar.com/blog/downloads/SMS-API2.0.zip
*)
-- Get a list of all "current messages" in Outlook.
tell application "Microsoft Outlook"
set theMessages to the current messages
end tell
@palaniraja
palaniraja / typesim.lua
Created November 10, 2023 13:38
code snippet type simulator (clipboard) for hammerspoon
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "v", function()
typesim()
end)
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "s", function()
stopType()
end)
activeTimer = nil
@palaniraja
palaniraja / righthalf.lua
Created October 10, 2023 19:03
hammerspoon right half on this monitor
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "space", function()
rightHalf()
end)
function rightHalf()
screen = hs.screen.mainScreen()
screenName = screen:name()
win = hs.window.focusedWindow()
app = win:application():name()
@palaniraja
palaniraja / xcode-buildconfig-delete.sh
Created June 26, 2019 03:29
script to delete unwanted buildconfig from xcodeproj file
#!/bin/bash
# get these ids by "grep -B 2 buildConfigurations project.pbxproj"
targets=("040030D22004301100C4B676" "0420B3DA1FD1E91B00F66B8C" "042171FE1F7EB27500B3578D" "0421731D1F7EB3EC00B3578D" "04CD5F511FD0D1650053BE87" "3461E09E1A7BF77600B666A1" "3461E0C21A7BF77600B666A1" "A0D180071F46067500E00C0C")
# get these xcodebuild -project YOURPROJ.xcodeproj -list
configsToSkip=("us-debug" "us-debug-free" "us-release" "us-release-free" )
@palaniraja
palaniraja / kotlin-monaco-bookmarklet.js
Last active October 3, 2023 02:51
Kotlin language support for bitbucket
javascript:(function(){window.s0=document.createElement('script');window.s0.setAttribute('type','text/javascript');window.s0.setAttribute('src','https://bookmarkify.it/bookmarklets/58928/raw');document.getElementsByTagName('body')[0].appendChild(window.s0);})();
@palaniraja
palaniraja / auto-shutdown.sh
Last active September 9, 2023 19:45
auto-shutdown on higher temprature for raspberrypi - kill kodi & fbi along - copied from raspberrypi forum
#!/bin/sh
# This script reads the Broadcom SoC temperature value and shuts down if it
# exceeds a particular value.
# 80ºC is the maximum allowed for a Raspberry Pi.
# Get the reading from the sensor and strip the non-number parts
SENSOR="`/opt/vc/bin/vcgencmd measure_temp | cut -d "=" -f2 | cut -d "'" -f1`"
# -gt only deals with whole numbers, so round it.
TEMP="`/usr/bin/printf "%.0f\n" ${SENSOR}`"
# How hot will we allow the SoC to get?
@palaniraja
palaniraja / swift-frontend.txt
Created January 19, 2023 21:42
Swift frontend usage reference
OVERVIEW: Swift frontend
USAGE: swift-frontend -frontend
MODES:
-compile-module-from-interface
Treat the (single) input as a swiftinterface and produce a module
-dump-ast Parse and type-check input file(s) and dump AST(s)
-dump-interface-hash Parse input file(s) and dump interface token hash(es)
-dump-parse Parse input file(s) and dump AST(s)