Skip to content

Instantly share code, notes, and snippets.

Avatar

Jikku Jose JikkuJose

View GitHub Profile
@JikkuJose
JikkuJose / private_opera.js
Last active Sep 16, 2020
Apple Script JAX snippet to create an application to start Opera in private mode by default in macOS
View private_opera.js
try {
opera = Application("Opera")
privateWindow = opera.Window({ mode: "incognito" })
opera.windows.push(privateWindow)
} catch {
console.log("Error")
}
/*
@JikkuJose
JikkuJose / node_modules.sh
Last active Jul 30, 2020
Manage node_modules. See how much storage they consume & remove them.
View node_modules.sh
alias nm_weight="find . -name 'node_modules' -type d -prune -print0 | xargs -0 du -chs"
alias nm_delete="find . -name 'node_modules' -type d -prune -print0 | xargs -0 rm -rf"
[~/Projects] $ nm_weight
129M ./dojo/02 - Game of Life/username/typescript/node_modules
133M ./dojo/03 - Mandelbrot Set/username/node_modules
406M ./BCProject/code/mobile/BCProject/node_modules
224M ./main/node_modules
319M ./count_tracker/node_modules
236M ./SB/exercism/username/reasonml/two-fer/node_modules
@JikkuJose
JikkuJose / resize.rb
Created Dec 10, 2018
DSLR image import
View resize.rb
#! /usr/bin/env ruby
require 'fileutils'
def resize(image_file, resolution = 1920, resize_directory = "resized")
basename = File.basename(image_file, ".CR2").split(".")[0]
FileUtils.mkdir_p resize_directory
%x|sips -Z #{resolution} -s format jpeg "#{image_file}" --out "#{resize_directory}/#{basename}.jpg"|
end
View react-router.txt
yarn add react-router-dom --save
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"
<Router basename={basename}>
<Switch>
<Route exact path="/" component={Home} />
<Route exact path="/blog" component={Blog} />
<Route
exact
@JikkuJose
JikkuJose / trivandrum.txt
Created Dec 2, 2018
Entities that handle document apostiling in Trivandrum
View trivandrum.txt
Passport Office Thiruvanthapuram SNSM. Building, Karalkada Junction, Kaithamukku, Thiruvanthapuram- 695024
Tel: 0471-2460132, 2470225
Fax: 0471-2461132 rpo.trivandrum@mea. gov.in
---
Shri George Dilip George
Tel: 0471-2334134 +91-7736560001
Email:
tvm@seplgroup.com
View btc_stats.txt
Balance | Addresses | Coins
---------------------- | ------------ | -------------
0 - 0.001 | 13752848 | 2,451
0.001 - 0.01 | 4749446 | 19,499
0.01 - 0.1 | 3893295 | 122,612
0.1 - 1 | 1652775 | 533,117
1 - 10 | 542637 | 1,447,283
10 - 100 | 133620 | 4,412,941
100 - 1,000 | 16301 | 3,809,684
1,000 - 10,000 | 1563 | 3,401,708
@JikkuJose
JikkuJose / list.txt
Created Nov 18, 2017
Syro Malabar Parishes
View list.txt
Dublin, Ireland, Syro Malabar Church
9 Worswick Street, St. Andrew's RC Church
Aarau, Aarau
Abbasiya, Kuwait, St. Daniel Comboni
Aberdeen, Kerala Catholic Community Aberdeen, Scotland
Aberdeen, Holy Family Church Deveron Road
Abhyagiri-Valayam, St. Mary's Church
Abu Dhabi, Syro-Malabar Catholic Community Oman
Achinakom, St. Antony's Church
Adackakundu, St.George Church
View repeat.js
export function repeat(object, number) {
let array = []
for(let i = 0; i < number; i++) {
array.push(object)
}
return array
}
@JikkuJose
JikkuJose / global.js
Created Jul 7, 2017
Style Components global style injection
View global.js
import { injectGlobal } from 'styled-components';
injectGlobal`
body {
font-family: Lato;
}
`
// import the file in the root index file as:
// import './styles/global.js'
View Logger.rb
require 'colorize'
COLORS = {
log: :blue,
error: :red,
ok: :green
}
module Validator
def valid_type?(type)
You can’t perform that action at this time.