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
The best practice to share code using Git is to setup a remote repository on some server <ServerA> at a location /usr/git/. We will now create a | |
repo at this location which will act as a central repo where multiple remote users can get access to the code and even can push/pull the code. | |
Let's say we have a central server where Git code will present and | |
2 remote user User A and User B. | |
Simple steps: | |
1. Now, go to central server and then create a project folder, type: | |
user@central_server: mkdir /usr/git/<project name> |
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
create a new file /usr/local/bin/restart_wifi.sh | |
and put below script in it. | |
ping -c4 192.168.1.1 > /dev/null | |
if [ $? != 0 ] | |
then | |
echo "No network connection, restarting wlan0" | |
sudo systemctl daemon-reload | |
sleep 5 |
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
import pyaudio | |
import wave | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 | |
CHUNK = 1024 | |
RECORD_SECONDS = 5 | |
WAVE_OUTPUT_FILENAME = "file.wav" | |
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
from pocketsphinx.pocketsphinx import * | |
from sphinxbase.sphinxbase import * | |
import os | |
import pyaudio | |
import wave | |
import audioop | |
from collections import deque | |
import time | |
import math |
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
/* eslint-env node */ | |
// Import file, libraries and plugins | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const sourceDir = __dirname + '/pgadmin/static'; | |
// webpack.shim.js contains path references for resolve > alias configuration | |
// and other util function used in CommonsChunksPlugin. | |
const webpackShimConfig = require('./webpack.shim'); | |
const PRODUCTION = process.env.NODE_ENV === 'production'; | |
const envType = PRODUCTION ? 'prod': 'dev'; |