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
_ng() { | |
local cur prev opts | |
local NG_COMMANDS="add build config doc e2e generate help lint new run serve test update version xi18n" | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="--help" | |
posopts="${NG_COMMANDS}" |
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
/* | |
Missing from TypeScript but documented by node. | |
See https://nodejs.org/api/errors.html#class-systemerror | |
*/ | |
interface NodeSystemError extends Error{ | |
address?: string; //If present, the address to which a network connection failed | |
code:string;// The string error 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
long nstrtol(const char *string, size_t len) | |
{ | |
long sig = 1; | |
long value = 0; | |
size_t i = 0; | |
if(string[0] == '-') | |
sign *= -1, i++; | |
for(; len > 0 && isdigit(string[i]); i++, len--) |
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
#include<stdio.h> | |
int main(int argc, char** argv, char** env) | |
{ | |
int i = 0; | |
while(env[i] != 0) | |
{ | |
printf("%s\n", env[i++]); | |
} | |
return(0); | |
} |
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
#block automatic logs created by bzr but tell it to send them to /dev/null | |
export BZR_LOG=/dev/null | |
#force use of system look and feel I am not affected by the hangs/crashes | |
export CALIBRE_USE_SYSTEM_THEME=1 | |
# fix python's ascii-127 addiction. | |
export PYTHONIOENCODING='utf_8' | |
#These may trigger strange issues with modules not tested on unicode yet but my terminal is UTF-8 by default anyway. |
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
#! /bin/bash | |
cc.debian -fdiagnostics-color=auto $* |
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
//install helper funtion not found in javascript | |
/** * Regular Expresion IndexOf for Arrays | |
* This little addition to the Array prototype will iterate over array | |
* and return the index of the first element which matches the provided | |
* regular expresion. | |
* Note: This will not match on objects. | |
* @param {RegEx} rx The regular expression to test with. E.g. /-ba/gim | |
* @return {Numeric} -1 means not found */ | |
if (typeof Array.prototype.reIndexOf === 'undefined') { |
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
#!/bin/sh | |
setcap "CAP_NET_ADMIN,CAP_NET_RAW+eip" `which iotop` | |
setcap "CAP_NET_ADMIN,CAP_NET_RAW+eip" `which dumpcap` |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | |
<mime-type type="application/x-kdeuser1"> | |
<comment>AppleWorks File</comment> | |
<magic-deleteall/> | |
<magic> | |
<match type="byte" offset="1" value="0x07"> | |
<match type="string" offset="4" value="BOBO"/> | |
</match> | |
</magic> |
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
# appleworks: file(1) magic for appleworks(v4,v6) documents | |
# Apple Works a word processor file | |
# Version 4.?,6.2.9 | |
# .cwk extention optional, MacOS Creator code:'BOBO' | |
1 byte =0x07 | |
>4 string BOBO | |
>>0 byte =0x04 AppleWorks 4 Document | |
>>0 byte =0x06 AppleWorks 6 Document |
NewerOlder