Skip to content

Instantly share code, notes, and snippets.

View arevindh's full-sized avatar
🤠
Focusing

itsmesid arevindh

🤠
Focusing
View GitHub Profile
@arevindh
arevindh / install_php_thread_php_7
Last active August 20, 2016 00:13
Install php 7 threadsafe with apache
source : https://www.linkedin.com/pulse/how-install-pthreads-php-sanjog-kumar-dash
http://www.tecmint.com/install-and-compile-php-7-on-centos-7-and-debian-8/
1. Obtain the Apache HTTP server from The Apache HTTP Server Project, and unpack it:
install apache2 using apt-get
3. Set Document root in /usr/local/apache2/conf/httpd.conf ( Check your apache binary path. Default document root is /usr/local/apache2/htdocs
@arevindh
arevindh / hotword.py
Created May 20, 2017 15:22
Google hotword edit lights
#!/usr/bin/env python
# Copyright (C) 2017 Google Inc.
#
# 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
#
@arevindh
arevindh / assistant.service
Last active September 23, 2022 12:15
Auto start google assistant on boot
#path /lib/systemd/system/assistant.service
[Unit]
Description=Google Assistant
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/bin/bash /home/pi/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library/hotword.sh
@arevindh
arevindh / alsa.conf
Created May 25, 2017 15:08
alsa.conf modification
sudo nano /usr/share/alsa/alsa.conf
## then replace
defaults.ctl.card 0
defaults.pcm.card 0
defaults.ctl.card 0
defaults.pcm.card 0
@arevindh
arevindh / update pihole-speedtest.sh
Last active July 18, 2017 18:42
update pihole speedtest
sudo su
#### -> If you dont have speedtest.db in /etc/pihole
#### -> cp /var/www/html/admin/scripts/pi-hole/speedtest/speedtest.db /etc/pihole/ <- only if you are on First version
# get latest webpage.sh file
cd /opt/pihole/
mv webpage.sh webpage.sh.mod
wget https://github.com/arevindh/pi-hole/raw/master/advanced/Scripts/webpage.sh
#get latest admin repo
https://community.ubnt.com/t5/EdgeMAX/WAN-Failure-notification/td-p/771248/page/2
I know I'm resurrecting an old thread, but here's the script and command I used. Hopefully it helps someone.
It's pretty basic, but it works. I used an external SMTP delivery service, Mailgun, to handle the email transport - this allows me to just use curl to send the message via their API. Mailgun is free for upto 10,000 emails/month.
set load-balance group WAN_FAILOVER transition-script /config/scripts/wlb-notification
#!/bin/bash
@arevindh
arevindh / update_pihole.sh
Last active December 13, 2017 16:59
update Pihole to 3.2
sudo su
#get latest admin repo
cd /var/www/html/admin
#if git remote -v gives something " origin https://github.com/arevindh/AdminLTE "
git pull
# if git remote -v gives something " mod https://github.com/arevindh/AdminLTE "
git pull mod master
@arevindh
arevindh / java.txt
Created September 7, 2018 16:40
Another Java installation is in progress.
%appdata%\..\LocalLow\Oracle\Java
delete JAVA_INSTALL_FLAG
@arevindh
arevindh / freenas_11_vm_not_booting_fix.txt
Created September 14, 2018 18:31
Freenas 11 VM not booting fix
#source https://www.reddit.com/r/freenas/comments/71no06/freenas_11_vm_not_booting/dncdmst/
On Ubuntu this worked for me too. If Grub is updated later you might have to copy it again.. Usually you can always manually boot from shell. Follow these steps:
When on UEFI Interactive Shell; type: exit
In the EFI menu system navigate to "Boot Maintenance Manager"
Select "Boot from file"
@arevindh
arevindh / .htaccess
Last active February 21, 2020 10:16
.htaccess for react router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteRule ^(Shibboleth.sso)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]