Skip to content

Instantly share code, notes, and snippets.

View arn-ob's full-sized avatar
☠️
__worker__

Arnob arn-ob

☠️
__worker__
View GitHub Profile
@arn-ob
arn-ob / git.sh
Created June 19, 2019 04:51
Simple Git Push/Pull Script. For Linux Terminal
#!/bin/bash
echo "Git Push/Pull Script.....############"
echo ""
echo "1. Git Push"
echo "2. Git Pull"
echo "3. Git Pull/Push with Select Link and Branch"
echo "4. Exit"
read -p "Choose [Enter Number]: " d
@arn-ob
arn-ob / setup.txt
Created May 4, 2019 14:40
Postgres Setup
Solution From https://bosnadev.com/2015/12/15/allow-remote-connections-postgresql-database-server/
CONNECT TO THE REMOTE SERVER
First things first, you need to login to the remote server:
mirzap@bosnadev:~$ ssh root@remote-host
1
mirzap@bosnadev:~$ ssh root@remote-host
CHANGE THE LISTEN ADDRESS
By default, PostgreSQL DB server listen address is set to the 'localhost' , and we need to change it so it accepts connection from any IP address; or you can use comma separated list of addresses. Here is how it looks by default:
@arn-ob
arn-ob / pg_password_reset.txt
Last active May 4, 2019 14:38
Postgs Password Reset
Postgase connection Password Reset
Soultion Get From https://stackoverflow.com/questions/12720967/how-to-change-postgresql-user-password
$ sudo -u postgres psql
Then:
\password postgres
Then to quit psql:
or
ALTER USER postgres PASSWORD 'H3llow?';
@arn-ob
arn-ob / esp8266.ino
Last active April 20, 2019 17:09
GET Request to server based on ESP8266 and Arduino Nano
#include <SoftwareSerial.h>
//Esp8266 | Arduino
// — — — — — — — — -
// RX | 11
// TX | 10
// GND | GND (same)
// VCC | 5v (same)
// CH_PD | 5v (same)
// GPIO 0 | None (same)
@arn-ob
arn-ob / btControl.ino
Last active April 3, 2019 12:25
Abeer Working Code
#include <SoftwareSerial.h>
SoftwareSerial BT(5, 4);
String readvoice;
#define fan1 9
#define light1 10
#define light2 11
#define fan2 12
@arn-ob
arn-ob / homeAuto.ino
Created March 24, 2019 20:20
Abeer Working Code
//Test
#include <Keypad.h>
#include <SoftwareSerial.h>
const byte ROWS = 4;
const byte COLS = 3;
boolean outs = true;
int LED = 7;
char hexaKeys[ROWS][COLS] = {
function split (thing) {
if (typeof thing === 'string') {
return thing.split('/')
} else if (thing.fast_slash) {
return ''
} else {
var match = thing.toString()
.replace('\\/?', '')
.replace('(?=\\/|$)', '$')
.match(/^\/\^((?:\\[.*+?^${}()|[\]\\\/]|[^.*+?^${}()|[\]\\\/])*)\$\//)
function print (path, layer) {
if (layer.route) {
layer.route.stack.forEach(print.bind(null, path.concat(split(layer.route.path))))
} else if (layer.name === 'router' && layer.handle.stack) {
layer.handle.stack.forEach(print.bind(null, path.concat(split(layer.regexp))))
} else if (layer.method) {
console.log('%s /%s',
layer.method.toUpperCase(),
path.concat(split(layer.regexp)).filter(Boolean).join('/'))
}
@arn-ob
arn-ob / server.js
Last active February 15, 2019 05:15
Get All Router(Get, POST) NodeJS
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var route = express.Router();
app.use(bodyParser.json());
app.use(function (req, res, next) {
if(req.body.name === "Arnob"){
console.log("Arnob Can Access");
next();
<?php
$token = '';
if(isset($_REQUEST['hub_challenge'])){
$challenge = $_REQUEST['hub_challenge'];
$token = $_REQUEST['hub_verify_token'];
}
if($token === "ar"){
echo $challenge;
}