I hereby claim:
- I am ron4stoppable on github.
- I am rohanonly (https://keybase.io/rohanonly) on keybase.
- I have a public key ASDF_NZ3kpA0_hbP_tma0Fz-c8UlIvOxVDIHmzVD-K6eego
To claim this, I am signing this object:
#!/bin/bash | |
touch 34_temp.text | |
lsof -n -i4TCP:$1 | awk '{print $2}' > 34_temp.text | |
pidToStop=`(sed '2q;d' 34_temp.text)` | |
> 34_temp.text | |
if [[ -n $pidToStop ]] | |
then | |
kill -9 $pidToStop | |
echo "Port $1 is now clear." | |
else |
I hereby claim:
To claim this, I am signing this object:
/* | |
Deep JSON object to flat JSON object preserving the nested structure with a delimiter. | |
Can use for dynamic forms | |
*/ | |
function jsonToSSFlatmap (obj: any, prefix: string) { | |
let list: any = {}; | |
for (const key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
const element = obj[key]; |
function jsonToSSFlatmap (obj: any, prefix: string) { | |
let list: any = {}; | |
for (const key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
const element = obj[key]; | |
if (typeof element === "object") { | |
const li = jsonToSSFlatmap( element, (prefix ? prefix + "||" : "") + key); | |
list = { | |
...list, | |
...li |
// to get proper scroll/page-offset value | |
// works in all browsers, over all platforms (as far as I have tested) | |
// this basically is for the different property in iOS browser & Safari | |
const scrollTop = Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop); |
import android.text.SpannableString; | |
import android.text.Spanned; | |
import android.text.TextUtils; | |
import android.widget.MultiAutoCompleteTextView; | |
public class SpaceTokenizer implements MultiAutoCompleteTextView.Tokenizer { | |
@Override | |
public int findTokenStart(CharSequence text, int cursor) { | |
int i = cursor; |
function arraymove(arr, fromIndex, toIndex) { | |
var element = arr[fromIndex]; | |
arr.splice(fromIndex, 1); | |
arr.splice(toIndex, 0, element); | |
} |
/* | |
Read more here: | |
https://developer.mozilla.org/en/CSS/@-moz-document | |
For more browser-specific hacks: | |
http://paulirish.com/2009/browser-specific-css-hacks | |
*/ | |
@-moz-document url-prefix() { | |
/* Put your Firefox specific code here. */ |
<!-- | |
CSS style to make the button stick to bottom of page | |
--> | |
<style> | |
#toUp { | |
position: fixed; | |
right: 5px; | |
bottom: 15px; | |
display:none; | |
} |