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 -e | |
PLAYER="mpv -vo null" | |
#PLAYER="mpg321" | |
MUSIC=$(find . -regextype posix-extended -iregex '.*(m4a|mp3|mp4|aac)$' | sort -R) | |
IFS=$'\n' | |
for file in $MUSIC |
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 /* | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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
<select name="year"> | |
<option value="">Year</option> | |
<?php for ($year = date('Y'); $year > date('Y')-100; $year--) { ?> | |
<option value="<?php echo $year; ?>"><?php echo $year; ?></option> | |
<?php } ?> | |
</select> | |
<select name="month"> | |
<option value="">Month</option> | |
<?php for ($month = 1; $month <= 12; $month++) { ?> | |
<option value="<?php echo strlen($month)==1 ? '0'.$month : $month; ?>"><?php echo strlen($month)==1 ? '0'.$month : $month; ?></option> |
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 -e | |
# | |
# Public domain | |
# Author: roman [] tsisyk.com | |
# Modified By: furkan [] s2n.io 2014.10.19, added cache parameter and deleting cookie file | |
# | |
# Usage: ./me url [youtube-dl parameters] | |
# | |
TMPDIR=/tmp |
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 | |
PUTIO_USERNAME="your put.io username" | |
PUTIO_PASSWORD="your put.io password" | |
wget --http-user=${PUTIO_USERNAME} --http-password=${PUTIO_PASSWORD} --content-disposition -c $@ |
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
/** | |
Original Code From, Md. Mahmud Ahsan, http://thinkdiff.net/mixed/base-conversion-handle-upto-36-bases/, 2008.02.28 | |
Adapted Objective-C, Furkan Mustafa, 2013.05.28 | |
Description: Alpha Numeric Base Conversion, Handles upto base 36 | |
*/ | |
NSString* reverseString(NSString* original) { | |
const char* chars = [original cStringUsingEncoding:NSASCIIStringEncoding]; | |
int length = strlen(chars); | |
char* new = (char*)malloc(length+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
Ghost in the shell - Ordered list of Movie and Series | |
===================================================== | |
Original: | |
- Ghost in the Shell (1995/10) | |
- Ghost in the Shell 2: Innocence (2004/3) | |
- (Series) Ghost in the Shell: Stand Alone Complex (2002/10 .. 2003/10, 26 episodes) |
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 | |
// TEST | |
// $res[] = "procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----"; | |
// $res[] = " r b swpd free buff cache si so bi bo in cs us sy id wa"; | |
// $res[] = " 0 0 0 10376 148188 291056 0 0 4 29 85 9 1 0 98 1"; | |
// // or | |
// // exec('vmstat', $res); | |
// print_r(parseVMStatOutput($res)); |
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 -e | |
# | |
# Extracted from: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/linux | |
set -x | |
ARCH=$(uname -m) | |
KARCH=x86 # applies to x86_64 too (change for arm, etc.) | |
pkgdir= |
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
/* f@s2n.io */ | |
// DateFormat Reference : http://www.unicode.org/reports/tr35/tr35-25.html#Date_Format_Patterns | |
#import <Foundation/Foundation.h> | |
extern NSString* const DATEFORMAT_RFC3339; | |
@interface NSDate (FMDateFormatters) | |
+ (NSDate*)dateWithString:(NSString*)dateString format:(NSString*)format locale:(NSLocale*)locale timezone:(NSTimeZone*)zone; |
NewerOlder