This file contains 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 | |
# Install the dependencies | |
sudo apt update | |
sudo apt install build-essential valac git libdbusmenu-gtk3-dev -y | |
# Download with git | |
cd /tmp | |
git clone https://git.sr.ht/~steef/snixembed |
This file contains 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
# 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 |
This file contains 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
[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 |
This file contains 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
Xvfb :1 -screen 0 1366x768x24 & | |
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :1 -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -noshm & | |
DISPLAY=:1 startxfce4 & |
This file contains 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
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: ")) |
This file contains 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
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: |
This file contains 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
arecord -f S16_LE -r 22050 -twav -D plughw:1,0 - | sudo pifm - |
This file contains 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 | |
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 |
This file contains 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/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 |
This file contains 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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import wx | |
import subprocess | |
from os import system | |
class BrightnessController(wx.Frame): | |
def debug_true(self): |
NewerOlder