Skip to content

Instantly share code, notes, and snippets.

View jogiji's full-sized avatar
🎯
Focusing

Rajiv Singh jogiji

🎯
Focusing
View GitHub Profile
@jogiji
jogiji / gist:7677bf6a7a32b06151603cbb0afd958f
Created November 22, 2022 00:37 — forked from netsensei/gist:7c71b3215bbf440746151aafc4cfd84f
Setting up a PI-Hole FTL DNS on a local network

Setuping PI-Hole FTL DNS on a local network

pihole comes with it's own lightweight DNS server called FTL. It's geared towards easy of use. Even so, setting up this feature can be hard. Here are some lessons I've learned.

In this example:

  • Your network is setup on 192.168.1.0/24
  • 192.168.1.1 is your DHCP server and IP gateway. (usually your router)
  • 192.168.1.254 is the host running pi-hole
@jogiji
jogiji / setup-dnsmasq.sh
Created May 15, 2022 07:07 — forked from archan937/setup-dnsmasq.sh
Point *.test to 127.0.0.1 using DNSMasq and NetworkManager on Ubuntu
#!/bin/bash
# Usage:
#
# curl -sL https://gist.githubusercontent.com/archan937/d35deef3b1f2b5522dd4b8f397038d27/raw/setup-dnsmasq.sh | sudo bash
#
DOMAIN=".test"
ensure_ping() {
#!/usr/bin/env python3
'''
always getting the most recent frame of a camera
================================================
Usage:
------
freshest_camera_frame.py
@jogiji
jogiji / perfectelementary.bash
Created November 1, 2020 04:34 — forked from ezeeyahoo/perfectelementary.bash
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#https://elementary.io/
#Clean-up System
sudo apt-get purge midori-granite -y
sudo apt-get purge yelp -y
sudo apt-get purge evince -y
sudo apt-get purge gnome-orca -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
@jogiji
jogiji / build_openalpr_android.sh
Created November 7, 2019 05:09 — forked from jav974/build_openalpr_android.sh
This bash script compiles openalpr for android. You just need to provide the path to Android SDK and Android NDK in the first lines of this code and execute it. Tested on ubuntu 17.04 64bit
#!/bin/bash
# You should tweak this section to adapt the paths to your need
export ANDROID_HOME=/home/jeremy/Android/Sdk
export NDK_ROOT=/home/jeremy/Android/Sdk/ndk-bundle
ANDROID_PLATFORM="android-21"
# In my case, FindJNI.cmake does not find java, so i had to manually specify these
# You could try without it and remove the cmake variable specification at the bottom of this file
@jogiji
jogiji / ipc.py
Created July 30, 2019 09:02 — forked from dankrause/ipc.py
Simple socket IPC in python
# Copyright 2017 Dan Krause
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,