This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
//Esp8266 | Arduino | |
// — — — — — — — — - | |
// RX | 11 | |
// TX | 10 | |
// GND | GND (same) | |
// VCC | 5v (same) | |
// CH_PD | 5v (same) | |
// GPIO 0 | None (same) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial BT(5, 4); | |
String readvoice; | |
#define fan1 9 | |
#define light1 10 | |
#define light2 11 | |
#define fan2 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function split (thing) { | |
if (typeof thing === 'string') { | |
return thing.split('/') | |
} else if (thing.fast_slash) { | |
return '' | |
} else { | |
var match = thing.toString() | |
.replace('\\/?', '') | |
.replace('(?=\\/|$)', '$') | |
.match(/^\/\^((?:\\[.*+?^${}()|[\]\\\/]|[^.*+?^${}()|[\]\\\/])*)\$\//) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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('/')) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$token = ''; | |
if(isset($_REQUEST['hub_challenge'])){ | |
$challenge = $_REQUEST['hub_challenge']; | |
$token = $_REQUEST['hub_verify_token']; | |
} | |
if($token === "ar"){ | |
echo $challenge; | |
} |