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 | |
# This program requires an xml dictionary file to run. If it is not on your machine, | |
# it will automatically be downloaded and stored in ~/.config/latin/. | |
# Name this file as 'latin' and run: | |
# | |
# $ chmod +x latin | |
# | |
# To run: |
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
// This program reads an XML dictionary file and prints a formatted result in | |
// terminal. | |
// | |
// NOTE: The required XML dictionary (76mb) will be downloaded to this | |
// machine if it is not found! | |
// | |
// | |
// ******************************************* | |
// * * | |
// * A VERY SPECIAL THANK YOU ! * |
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
// This program parses an online XML dictionary site and prints | |
// conjugated results for input terms. | |
// | |
// The goals of this project: | |
// | |
// 1. < 100 lines code | |
// 2. Simple & elegant coding | |
// 3. Fast & efficient execution. | |
// | |
// "Do one thing, |
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
// This program moniters the clipboard / primary (mouse selection) buffers | |
// and prints text or runs a command on change. | |
// | |
// The goals of this project: | |
// | |
// 1. < 100 lines code | |
// 2. Simple & elegant coding | |
// 3. Fast & efficient execution. | |
// | |
// "Do one thing, |
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
// This program checks and/or monitors your emails, | |
// prints a count of new mail, and runs user a defined | |
// command upon a new email. | |
// | |
// Note: A file containing only the users last email | |
// count will be stored your computer in: | |
// | |
// ~/.config/mailcount | |
// | |
// The goals of this project: |
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
// | |
// Compile with: | |
// $ g++ -O3 -Wall searchreplace.cpp -o searchreplace | |
// | |
// Run with: | |
// $ searchAndReplace | |
// | |
// | |
// This program searches for user specified text strings (a starting point | |
// point to an ending point) and replaces them and all contents between |
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
// This code comes from: | |
// https://www.geeksforgeeks.org/b-tree-set-1-insert-2/ | |
// | |
// It has been altered to support a string index and two integer values. | |
// | |
#include<iostream> | |
#include<string> | |
using namespace std; |
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
// Compile with: | |
// | |
// g++ -std=c++11 -O2 -Wall bar.cpp -o bar -lasound -lpthread | |
// | |
#include<alsa/asoundlib.h> // install libasound2-dev | |
#include<fstream> | |
#include<iostream> | |
#include<string> | |
#include<chrono> |
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/sh | |
URL="https://weather.gc.ca/city/pages/on-77_metric_e.html" | |
A='center">' | |
B='</p>' | |
C='>' | |
D='°' | |
echo $(wget -q -O- "$URL" | awk -v v1="$A" -v v2="$B" -v v3="$C" -v v4="$D" '$0 ~ v1 ".*" v2 {sub(v2 ".*", ""); sub(".*" v1, ""); print $0; next;} $0 ~ v3 ".*" v4 {sub(v4 ".*", ""); sub(".*" v3, ""); print $0 "°C"; exit}') |
OlderNewer