Skip to content

Instantly share code, notes, and snippets.

View vubon's full-sized avatar
🎯
Focusing

Vubon vubon

🎯
Focusing
View GitHub Profile
@vubon
vubon / Galaxy.markdown
Created September 14, 2015 19:27
Galaxy

Galaxy

You can change the color or use sun and earth image then make it is very pretty.

A Pen by Vubon on CodePen.

License.

@vubon
vubon / record.py
Last active August 23, 2022 02:16
PyAudio Voice Record
import pyaudio
import wave
CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RECORD_SECONDS = 20 # You can change the time . it is calculationg second
WAVE_OUTPUT_FILENAME = "output.wav"
@vubon
vubon / converter.py
Last active January 1, 2017 17:25
Converting Decimal Number <=> Binary Number and Decimal Number <=> Hexadecimal Number
num = int(input("Enter your number: "))
result = bin(num)[2:]
hexnum = hex(num)[2:]
print("Your binary number: ", result)
print("Your Hexadecimal number: ", hexnum)
print("........................................")
intResult= int(result, 2)
hexResult= int(hexnum, 16)
@vubon
vubon / ADB.txt
Created January 17, 2017 19:15
Manually adding Android ADB USB driver in Ubuntu 16.04 LTS
Requirements:
Operating System: Ubuntu 16.04 LTS
Android Developer Tools (ADT) installed
Steps:
Make sure that you have connected your Android device in USB Debugging mode
Press Ctrl + Alt + T for Terminal and use the following command:
lsusb
@vubon
vubon / ReadMe.txt
Last active January 8, 2019 16:14
Install PostgreSQL in Ubuntu 16.04
#Update your apps by below command and install
$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib
#Connect to PostgreSQL
$ sudo su - postgres
$ psql
#Checking connection with user information
@vubon
vubon / xampp.txt
Created June 6, 2017 09:15
Install New version xampp in your Ubuntu machine
First go to here https://www.apachefriends.org/download.html
Now copy the url
You will get the URL like this
https://www.apachefriends.org/xampp-files/7.1.4/xampp-linux-x64-7.1.4-0-installer.run
Now open your terminal and run the following command
wget https://www.apachefriends.org/xampp-files/7.1.4/xampp-linux-x64-7.1.4-0-installer.run
After that run this
@vubon
vubon / terminal.txt
Created June 13, 2017 05:15
File copy or Folder copy by Terminal from Remote server
Firstly You need to open your terminal then login
scp -r ursername@hostname:/path of your file or folder /home/where you want to save the folder or file
This command copy your file from remote server .
now if you want to send a file in your server then you can write down below command
scp -r /home/where you want to save the folder or file ursername@hostname:/path of your file or folder
@vubon
vubon / Insert csv data PostgreSQL database by Python.txt
Last active January 1, 2018 14:51
Insert csv data PostgreSQL database by Python
Firstly import below modules in Python file or Django file .
1. csv
2. psycopg2
Now Firstly create a connection with your database below way
try:
conn_string="dbname='user database name' user='database user name' host='localhost' password='your user password'"
print ("Connecting to database\n->%s" % (conn_string))
conn = psycopg2.connect(conn_string)
print ("connection succeeded")
except:
@vubon
vubon / form.php
Created September 24, 2017 16:02
WordPress post password form customization
// Your page content display by this code
<?php if ( !post_password_required() ) { ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<?php } ?>
@vubon
vubon / form.php
Created September 24, 2017 16:02
WordPress post password form customization
// Your page content display by this code
<?php if ( !post_password_required() ) { ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<?php } ?>