Skip to content

Instantly share code, notes, and snippets.

View boseji's full-sized avatar
💭
Accelerating dreams into infinity.

Abhijit Bose boseji

💭
Accelerating dreams into infinity.
View GitHub Profile
@boseji
boseji / Rapi-Secure.md
Last active April 6, 2024 19:35
Securing the Raspberry Pi
@boseji
boseji / sqr_1ch_random.py
Created November 4, 2013 00:27
Python code for Raspberry Pi to generate Pulse train on GPIO 7 pin 26 of P1
#!/usr/bin/python
#######
# This program would generate Squence pulse train on GPIO 7 Pin 26 of P1
#######
import RPi.GPIO as GPIO
from time import sleep
import sys
import signal
def signal_handler(signal, frame):
@boseji
boseji / git-commit-email-modify.md
Created August 13, 2019 03:11
Rename the Commiter and Email address in Git

Details

This command would alter the default committer name and email address for each of the commits.

This command uses the git filter-branch command.

$ git filter-branch --env-filter '
WRONG_EMAIL="wrong@example.com"
NEW_NAME="New Name Value"
@boseji
boseji / Manjaro-tricks.md
Last active October 14, 2023 01:06
Manjaro Linux : Tips and Tricks (ARCH Linux under the hood)

Manjaro Linux : Tips and Tricks

We have been using [Manjaro linux][2] for past year and have been happy with its perfomance. Though we don't use te [AUR][1] (Arch User Repository, since many are not supported into Manjaro.

The best part is even with bad / dumb users like myself, IT-DOES-NOT-BREAK. So, we very much recommend [Manjaro][2].

It seriously worked much better than Ubuntu. We might not be able to have all the boat load of software & support like Debian, but we are happy.

@boseji
boseji / wdt_sleep.ino
Created December 16, 2016 13:37
Arduino Pro Mini Low power Sleep Example
/**
* Arduino Pro Mini Low power Sleep Example
*
* @license BSD Open Source License
* Copyright (c) 2004-2021 Abhijit Bose < salearj [at] hotmail [dot] com >
* If you require a license, see
* http://www.opensource.org/licenses/bsd-license.php
*
* @note
* This example show how to properly enter sleep mode and wake up
@boseji
boseji / Rpi-InfluxDB-Install.md
Last active February 5, 2022 17:34
Raspberry Pi InfluxDB installation

Raspberry Pi InfluxDB: The solution for IoT Data storage

Raspberry Pi is costeffect linux computer very commonly used for IoT home automation projects.

Here are the 3 problems with conventional databases for IoT data store applications:

  • Too much or complex configuration
  • Unable to expire data / set retentional policies
  • Not tailor made of Time Series Data
@boseji
boseji / sqr_1ch_1k_50p.py
Created November 4, 2013 00:30
Python code for Raspberry Pi to generate a square wave of 50% duty cycle on GPIO7 pin 26 of P1 with 1kHz frequency
#!/usr/bin/python
#######
# This program would generate PWM on GPIO 7 Pin 26 of P1
# with 50% Dutycyle at 1kHz
#######
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(7,GPIO.OUT)
@boseji
boseji / pbkdf2-gen.go
Created May 10, 2021 04:54
PBKDF2 Key Derivation
// Copyright 2021 Abhijit Bose. All rights reserved.
// Use of this source code is governed by a Apache 2.0 license
package main
import (
"bytes"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
@boseji
boseji / bcrypt-gen.go
Created May 10, 2021 04:44
bcrypt for Passwords
// Copyright 2021 Abhijit Bose. All rights reserved.
// Use of this source code is governed by a Apache 2.0 license
package main
import (
"fmt"
"encoding/hex"
"golang.org/x/crypto/bcrypt"
)
@boseji
boseji / aes-gcm-decrypt.go
Created May 10, 2021 04:42
AES GCM Example
// Copyright 2021 Abhijit Bose. All rights reserved.
// Use of this source code is governed by a Apache 2.0 license
package main
import (
"crypto/aes"
"crypto/cipher"
"encoding/hex"
"fmt"