Skip to content

Instantly share code, notes, and snippets.

View shajanjp's full-sized avatar
🎯
Wiring up zeros and ones

Shajan Jacob shajanjp

🎯
Wiring up zeros and ones
View GitHub Profile
@shajanjp
shajanjp / .bashrc
Created October 29, 2017 15:22
Custom Bash style with git support
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\]$ "
@shajanjp
shajanjp / image_magick_hacks.md
Last active November 2, 2017 06:30
ImageMagick Script Hacks
convert sample-avatar.jpeg -resize 250x250^ -gravity center -crop 250x250+0+0 result.jpg
@shajanjp
shajanjp / index.js
Created February 6, 2018 07:02
timeOut
// `npm install robotjs` before running
let robot = require("robotjs");
let curTime;
let tym;
let inMinutes;
robot.setMouseDelay(2);
let screenSize = robot.getScreenSize();
let height = (screenSize.height / 2) - 10;
{
"parserOptions": {
"ecmaVersion": 6
},
"extends": "google",
"rules": {
"require-jsdoc": [
"off"
],
"max-len": ["warn"]
@shajanjp
shajanjp / semantic-responsive-sidebar.html
Created October 29, 2018 10:35
Responsive Sidebar for Semantic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
</head>
<body>
<div class="ui sidebar inverted vertical menu">
<a class="item">
@shajanjp
shajanjp / muti-input.html
Created November 21, 2018 12:47
Multiple inuputs in html form
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic Starter</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
</head>
<body>
<div class="ui container">
<div class="ui stackable grid">
{
"added_words":
[
"Techno",
"Cubet",
"Arduino"
],
"auto_format_on_save": true,
"binary_file_patterns":
[
{
"parserOptions": {
"ecmaVersion": 6
},
"extends": "google",
"rules": {
"require-jsdoc": [
"off"
],
"max-len": ["off"]
function alertEveryone(fullName) {
let myName = `Mighty ${fullName}`;
for (let i = 0; i < length; i++) {
console.log(`${myName} is coming..`)
}
}
alertEveryone("Octocat");
let people = [
["Arun Prabhakaran",
"Abhilash Pillai",
"Vishnu Agikumar",
"Lovegin John",
"Akhilesh PV",
"Bibin Binny Mathew ",
"Amal Babu"],
["Akhil Xavier",