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
accounts.cdn.mozilla.net | |
addons.cdn.mozilla.net | |
addons-discovery.cdn.mozilla.net | |
addons.mozilla.org | |
aus5.mozilla.org | |
blocklist.addons.mozilla.org | |
blocklists.settings.services.mozilla.com | |
blog.mozilla.org | |
bugzilla.mozilla.org | |
developer.mozilla.org |
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
PROBLEM by AW | |
I need someone to create a command that does this for me `timediff 13:54:05 | |
14:06:42 #outputs: 00:12:37` If you put that command on github I 94% promise to | |
star the repository or gist it is in for at least 3 days :0) | |
SOLUTION1 (untested) by PH | |
timediff () { date +%H:%M:%S -d "1970-01-01 + $(( $(date +%s -d "1970-01-01 $timeb") - $(date +%s -d "1970-01-01 $timea") )) seconds" ; } | |
SOLUTION2VERSION1 by KU | |
date +%T -d @$(( $( date +%s -d "$1" ) - $( date +%s -d "$2" ))) |
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
String fxns (in,not in) | |
from str (.center,.count,.find,.index,.isdigit,.isalpha, | |
.join,len,.ljust,.lstrip,.rjust,.split) | |
Array/List fxns (.append,.clear,.copy,.count,.extend,in,.index, | |
.insert,list,not in,.pop,.remove,.reverse,.sort) | |
Dict/Hash fxns (.values,.keys,in,not in) | |
mydict = { 1:'sup', 's':'a value' } | |
Variable fxns (False,int,is,None,range,repr,str,True,type) | |
Math fxns (**,pow,round) | |
from float (.is_integer) |
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
#what's not here: continue{} block, OOP (mostly), threads, POD, | |
# exporting subroutines (mostly), packages, debugging, | |
# special variables (mostly), regular expressions (mostly). | |
String fxns (chomp,chop,chr,index,lc,length,oct,ord,rindex,split,sprintf,substr,uc,ucfirst) | |
Array/List fxns (@ARGV,grep,join,map,pop,push,reverse,shift,sort,splice,qw//,unshift,List::Util=shuffle) | |
Hash fxns (delete,each,exists,keys,values) | |
Variable fxns (defined,ref,scalar) | |
All fxns(printf,undef,Data::Dumper) | |
Exception fxns ($@[eval error]) | |
Math fxns (**,abs,hex,int,oct,rand,sqrt,Math::Trig=:pi[pi]) |
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 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
armshq.org | |
atl.clanwarz.com | |
ball.holdings | |
beardedclams.net | |
bear.mumbleboxes.com | |
b-f-f.net | |
br3ntor.us | |
cbytes.net | |
compu.ml | |
d4n.nl |
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
#include <stdio.h> | |
#include <limits.h> | |
int main(void){ | |
/* do your program here, for example: */ | |
int *p_array; | |
double *d_array; | |
p_array = (int *)malloc(sizeof(int)*50); // allocate 50 ints | |
d_array = (int *)malloc(sizeof(double)*100); // allocate 100 doubles |