Skip to content

Instantly share code, notes, and snippets.

palaniraja palaniraja

Block or report user

Report or block palaniraja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
palaniraja / out.html
Last active Mar 12, 2019
Find all the files changed between two commits and cumulated commit messages per file
View out.html
<html><head><style>td{white-space: pre;}</style></head><body><table border=1>
<td>File: (file1.txt)</td>
5755793 commit from master (correct this time)
322afb2 file 1 modified, and to be tagged as v1
<td>File: (file2.txt)</td>
palaniraja /
Created Nov 12, 2018
alias - alias from my work machine to refer later (ohmyzsh + few custom)
-='cd -'
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
palaniraja / app.js
Last active Nov 1, 2018
React native - webview wrapper - keyboard issue
View app.js
* Sample React Native App
* @format
* @flow
import React, {Component} from 'react';
import {StyleSheet, WebView, View, Text, SafeAreaView, KeyboardAvoidingView} from 'react-native';
palaniraja / main.dart
Last active Oct 15, 2018
Flutter - Asynchronous programming snippet
View main.dart
import 'dart:convert';
import 'dart:async';
import 'dart:html';
void main(){
_getIPAddress() {
final url = '';
Future<HttpRequest> request = HttpRequest.request(url);
request.then((value) {
palaniraja / Default.idekeybindings
Last active Aug 20, 2018
xcode - behaviour keybindings from `~/Library/Developer/Xcode/UserData/KeyBindings`
View Default.idekeybindings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Menu Key Bindings</key>
<key>Key Bindings</key>
palaniraja /
Created Aug 17, 2018
Twitter data size analysis

twitter.txt is output of df -ah twitter exported data. Removed each ./tweet_media file sizes)

Stats on my account

  45 - Followers
 287 - Following
   2 - Listed
9930 - Tweets  
7527 - Favorites
palaniraja /
Created Jul 26, 2018
PiLapse - Python script to take timelapse
import os
import time
import subprocess
from time import sleep
import random
# Configuration
palaniraja /
Last active Jun 22, 2018
auto-shutdown on higher temprature for raspberrypi - kill kodi & fbi along - copied from raspberrypi forum
# 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 /
Last active May 15, 2019
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
filename=`basename pwd`
palaniraja / camera-lens.xml
Created Jun 14, 2018
My Canon SLR lens - optics info from lensfun
View camera-lens.xml
<model>Canon EF-S 18-55mm f/3.5-5.6 IS II</model>
<mount>Canon EF-S</mount>
<!-- Average crop factor of Canon APS-C cameras -->
<distortion model="ptlens" focal="18" a="0.02504" b="-0.06883" c="0.01502"/>
<distortion model="ptlens" focal="24" a="0.0203" b="-0.06514" c="0.04768"/>
You can’t perform that action at this time.