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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- flat ui colors --> | |
<!-- a transposition of the lovely colors from https://flatuicolors.com/ --> | |
<color name="turqoise">#1abc9c</color> | |
<color name="green_sea">#16a085</color> | |
<color name="emerald">#2ecc71</color> | |
<color name="nephritis">#27ae60</color> |
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 | |
POSTS_FOLDER="./_posts" | |
ASSETS_FOLDER="./assets" | |
read -p "Post name: " POST_PRETTY_NAME | |
read -p "Post categories: " POST_CATEGORIES | |
# generate post info | |
POST_DATE="$(date +%Y-%m-%d)" |
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
Upstart -> service <service> start | |
Systemd -> systemctl start <service> | |
SysV init -> /etc/init.d/<service> start |
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
diff --git a/youloop b/youloop | |
index 3cb99e7..b94f06f 100644 | |
--- a/youloop | |
+++ b/youloop | |
@@ -9,9 +9,9 @@ function loop(){ | |
mpv=`pgrep mpv` | |
if [[ $url == *"youtube"* && $mpv == "" ]] | |
then | |
+ echo "$url" > /tmp/youtubeurl | |
mpv --hwdec vaapi --ytdl-format=bestvideo[ext=mp4]+bestaudio[ext=m4a] "$url" |
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 | |
function loop(){ | |
sleep 2 | |
url=`xclip -selection clipboard -o` | |
if [[ `cat /tmp/youtubeurl` == "$url" ]] | |
then | |
return | |
fi | |
mpv=`pgrep mpv` | |
if [[ $url == *"youtube"* && $mpv == "" ]] |
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
<!-- A fairly normal copyright stamp with placeholder for current year --> | |
<p>© Copywright <span class="copyrightYear"></span>, All rights reserved.</p> | |
<!-- Copywright date injection --> | |
<script type="text/javascript"> | |
(function() { | |
function injectCopywrightDate() { | |
var year = new Date().getFullYear(); | |
var placeholders = document.getElementsByClassName('copyrightYear'); |
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
$('a').on('click', function (e) { | |
// jQuery Mobile uses anchor tags for slider handles... | |
// | |
// Using the following is less eloquent than using :not() | |
// but it is browser compliant. | |
if ( !$(this).hasClass('ui-slider-handle') ) { | |
var external = this.target === '_blank' || this.rel === 'external'; |
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
/** | |
* azend's theory on medical naming schemes | |
*/ | |
function nameMedicalCondition ( mainSymptom, severity ) { | |
var name = mainSymptom; | |
if ( is_int(severity) && severity > 5 + ( Math.floor( Math.rand() * 4 ) - 2 ) ) { | |
name += 'icul'; | |
} |
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 | |
import argparse | |
import threading | |
class Worker(threading.Thread): | |
def run (self): | |
while True: | |
pass; | |
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
/* Diyode CodeShield Pinout Constants */ | |
#define ENCODER_A 14 | |
#define ENCODER_B 15 | |
#define ENCODER_PORT PINC | |
#define SWITCH 13 | |
#define BUTTON 12 | |
#define RGB_RED 11 | |
#define RGB_GREEN 10 | |
#define RGB_BLUE 9 | |
#define LED 6 |
NewerOlder