Quick scripts for Solus, mostly for building and installing elementary apps from git.
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
#!/usr/bin/env python3 | |
from time import time | |
def timeit(func): | |
"""Decorator to time execution of a function and print it out.""" | |
def timed(*args, **kw): | |
start = time() | |
result = func(*args, **kw) |
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
export LC_CTYPE=en_US.UTF-8 | |
export FIREBIRD_HOME=/Library/Frameworks/firebird.framework/Resources | |
export PATH=$PATH:$FIREBIRD_HOME/bin | |
export LOCAL_IP=`ipconfig getifaddr en0` | |
# alias | |
alias home='cd ~ && ll' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ls='ls -GwF' |
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
{"lastUpload":"2019-10-21T21:22:25.828Z","extensionVersion":"v3.4.3"} |
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
/* Mail */ | |
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("mail.google.com") { | |
.gb_Sa:not(.gb_Ta) .gb_Cd { | |
padding: 0 !important; | |
} | |
.gb_Me { | |
border-radius: 0 !important; | |
} | |
.G-atb, |
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
ac | |
com.ac | |
edu.ac | |
gov.ac | |
net.ac | |
mil.ac | |
org.ac | |
ad | |
nom.ad | |
ae |
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
$ twofactorauth | |
[DEBUG] Loading css file /usr/local/share/two-factor-auth/data/style.css | |
[DEBUG] [APP MENU] : adding gnome shell menu | |
[ERROR] Coudln't check if a table exists | |
[ERROR] no such table: providers | |
# App starts and looks fine, no entries of course | |
# I added a new entry with an invalid secret (called Google, secret code "abcde") | |
[ERROR] Canno't generate a two-factor auth code | |
[ERROR] Incorrect padding | |
[ERROR] Couldn't generate the code |
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
var getPrimeFactors = function (number) { | |
var i = 2; | |
var limit = Math.floor(number/2); | |
var factors = []; | |
while (i < limit) { | |
// Check if number is divisible by i, if yes add i to list of factors and repeat | |
// (There can be multiple prime factors of the same value, e.g. 12=2*2*3) | |
while (number % i === 0) { | |
number /= i; | |
factors.push(i); |
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
text = "Kanye says: This string has the name Kenny embeded in it\n the following function should find it."; | |
var myName = "Kenny"; //String to find | |
var hits = []; // Empty array to put it into | |
var altHits = []; // Empty list for alternative hits | |
// Look for "K" in the text | |
/* | |
Loop over numbers from `0` to `text.length` | |
so you can access the single characters of `text` |
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
[ | |
{ | |
"name": "Google Chrome", | |
"icon": "google-chrome", | |
"issue": 30, | |
}, | |
{ | |
"name": "Texmaker", | |
"icon": "", | |
"issue": 31, |