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] | |
Version=1.0 | |
Type=Application | |
Name=OpenSQL Pro | |
Comment=A powerfully simple database client | |
Icon=office-database | |
Exec=python . | |
Path=/home/alan/GitHub/opensql-pro | |
Categories=Development; | |
StartupNotify=true |
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 | |
btc=$(curl -s https://api.coinbase.com/v2/prices/BTC-USD/buy | json data.amount) | |
eth=$(curl -s https://api.coinbase.com/v2/prices/ETH-USD/buy | json data.amount) | |
ltc=$(curl -s https://api.coinbase.com/v2/prices/LTC-USD/buy | json data.amount) | |
echo 'BTC $'$btc' ETH $'$eth' LTC $'$ltc |
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
# This will convert an Antergos Gnome installation to Xfce | |
# GDM will be replaced with LightDM with the GTK greeter | |
# It keeps a few Gnome utilities around and installs Xfce4's WhiskerMenu plugin | |
# Don't continue on errors, since we can really screw up a system if we do | |
set -e | |
# Kill existing sessions | |
sudo systemctl stop gdm |
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
# This will convert an Antergos Xfce installation to Gnome | |
# LightDM will be replaced with GDM | |
# Don't continue on errors, since we can really screw up a system if we do | |
set -e | |
# Common packages | |
# evince | |
# file-roller | |
# gnome-calculator |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"strings" | |
"time" | |
) | |
func main() { |
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
{ | |
"autoclose": true, | |
"autoindent": true, | |
"autosave": false, | |
"colorcolumn": 80, | |
"colorscheme": "monokai", | |
"cursorline": true, | |
"eofnewline": true, | |
"ignorecase": false, | |
"indentchar": " ", |
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 | |
# This script is meant to be run on a fresh install of Antergos with Xfce | |
function prompt() { | |
echo -n "$1 [y/n] " | |
read prompt_response | |
if [ $prompt_response == 'y' ]; then | |
return 0 | |
else | |
return 1 |
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
<?php | |
/** | |
* Blur values in both directions | |
* @param resource $src | |
* @param integer $radius | |
* @return resource | |
*/ | |
function blur($src, $radius) { | |
return bVert(bHoriz($src, $radius), $radius); |
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
/** | |
* Replace URLs with hyperlinks in an element | |
* | |
* @param {string} selector | |
* @return {void} | |
*/ | |
var linkReplace = function(selector) { | |
var element = document.querySelector(selector); | |
var text = element.innerHTML; | |
text = text.replace(/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g, function(match) { |
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 php | |
<?php | |
if (empty($argv[1]) || $argv[1] == '-h') { | |
exit ("Usage: markov <input file> [words] [prefix] [minWords]\n"); | |
} | |
$text = file_get_contents($argv[1]); | |
$map = map($text); | |
$words = $argv[2] ?? 20; | |
$minWords = $argv[4] ?? 10; |