Skip to content

Instantly share code, notes, and snippets.

View archisman-panigrahi's full-sized avatar

Archisman Panigrahi archisman-panigrahi

View GitHub Profile
# source: https://askubuntu.com/a/1346398/124466
sudo apt install -y git devscripts build-essential cmake ninja-build
sudo apt install -y qtbase5-dev qtquickcontrols2-5-dev libkf5networkmanagerqt-dev modemmanager-qt-dev debhelper extra-cmake-modules libkf5kio-dev libkf5screen-dev libqt5sensors5-dev qtdeclarative5-dev qttools5-dev qttools5-dev-tools libxcb-icccm4-dev qtbase5-private-dev kwin-dev libkdecorations2-dev libqt5xdg-dev libdbusmenu-qt5-dev libxcb-ewmh-dev libicu-dev libxcb-randr0-dev libsm-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-composite0-dev libxcb-shm0-dev libxcb-util-dev libxcb-image0-dev libxtst-dev libpulse-dev libpolkit-qt5-1-dev libpolkit-agent-1-dev libqt5x11extras5-dev
mkdir -p ~/Downloads/cutefish
cd ~/Downloads/cutefish
git clone https://github.com/cutefishos/libcutefish.git
cd libcutefish
dpkg-buildpackage -uc -us -b
@archisman-panigrahi
archisman-panigrahi / insect.desktop
Created February 8, 2021 05:10
Desktop file for Insect
[Desktop Entry]
Name=Insect
Comment=High precision scientific calculator with support for physical units
TryExec=insect
Exec=insect
Icon=insect-favicon
Terminal=true
Type=Application
Categories=Education;Science;Math;
Keywords=science;math;numerical computation;calculator;physics;quantities;units
Xvfb :1 -screen 0 1366x768x24 &
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :1 -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -noshm &
DISPLAY=:1 startxfce4 &
print("Press 1 to add two numbers, 2 to subtract, 3 to multiply, 4 to divide")
a = int(input())
#Note: Generally input is interpreted as a string.
#Therefore I am converting that to integer
if a == 1:
b = float(input("First number: "))
#Note:In the above line the input is converted to a float
c = float(input("Second number: "))
int sensor = 2; //one pin of sensor is connected to digital pin 2, the other is connected to 5volt.
int ledPin = 6; //longer pin of LED is connected to digital pin 6, the other is connected to ground through a resistor.
void setup() {
Serial.begin(9600);
pinMode(sensor, INPUT);
pinMode(ledPin, OUTPUT);
}
// the loop routine runs over and over again forever:
@archisman-panigrahi
archisman-panigrahi / mic2fm
Created July 17, 2019 07:50
This script captures audio and transmits to fm in a raspberry pi, using the PiFm program
arecord -f S16_LE -r 22050 -twav -D plughw:1,0 - | sudo pifm -
#!/bin/bash
wget https://raw.githubusercontent.com/apandada1/c/master/first-n-prime-printer.c
gcc first-n-prime-printer.c -lm -o prime.exe
echo
echo
echo -e ******"\e[96m"Instructions"\e[39m"******
echo -e "\e[93m"prime.exe"\e[39m" is saved.
echo -e To run the program enter the command
echo -e "\e[92m""./prime.exe number-of-primes"
echo -e "\e[39m"eg, "\e[92m"./prime.exe 5"\e[39m" will provide the following output
@archisman-panigrahi
archisman-panigrahi / install_zip.sh
Last active April 26, 2016 04:31 — forked from LordAmit/install_zip.sh
install.sh of Brightness Controller
#!/bin/sh
# Install Brightness Controller script
# Download / Save this script. Make it executable. Run it.
# It requires having wget installed, if you use another command line interface downloader, change wget to it.
wget https://github.com/lordamit/Brightness/archive/master.zip
unzip -o master.zip -d ~/.Brightness
rm master.zip
echo "[Desktop Entry]
Encoding=UTF-8
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import wx
import subprocess
from os import system
class BrightnessController(wx.Frame):
def debug_true(self):
function getZipCode(location, callback) {
//If it's a woeid, we bypass the first step
if ($.isNumeric(location)) {
woeid_request(location, callback)
//If they use a normal location
} else {
$.get("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22" + encodeURIComponent(location) + "%22&format=xml", function(locationData) {
// Gets the WOEID && Caches Location Name
var woeid = $(locationData).children().children().children().first().children().filterNode("woeid").text()
localStorage.typhoon_location = $(locationData).children().children().children().first().children().filterNode("name").text()