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
<!doctype html> | |
<html> | |
<head> | |
<script> | |
function displayJSON() { | |
var scheduler = [ | |
{"id": 7, "name": "Abc", "isOn": false, "count": 5, "date": "2014-01-05"}, | |
{"id": 3, "name": "Gringo", "isOn": false, "count": 97, "date": "2017-09-21"}, | |
{"id": 99, "name": "Schedule 1", "isOn": true, "count": 432, "date": "2013-12-16"}, | |
{"id": 12, "name": "lol", "isOn": false, "count": 56, "date": "2014-10-13"} |
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
<!doctype html> | |
<html> | |
<head> | |
<script> | |
function init() { | |
loadJSON(function (response) { | |
displayJSON(response); | |
}); | |
} // init | |
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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import rx.Observable; | |
import rx.Observer; | |
import rx.functions.Func2; | |
public class RxJavaExamples { |
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
@echo off | |
del log.txt 2>nul | |
for /f "delims=" %%a in (servers.txt) do ping -n 2 %%a >nul && ( | |
>>online.txt echo %%a&echo %%a online) || ( | |
>>offline.txt echo %%a&echo %%a offline) |
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
import subprocess | |
import csv | |
def ping(hostname): | |
p = subprocess.Popen('ping ' + hostname, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
pingStatus = 'ok'; | |
for line in p.stdout: | |
output = line.rstrip().decode('UTF-8') |
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
''' | |
This program is free software. | |
It comes without any warranty, to the extent permitted by applicable law. | |
You can redistribute it and/or modify it under the terms of the WTFPL Version 2, as published by Sam Hocevar. | |
See wikipedia.org/wiki/WTFPL for more details. | |
Created on 2014-25-11 | |
@author: Aries McRae | |
''' |
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 | |
for dir in /opt/aaa/bbb/ccc/*/ | |
do | |
dir=${dir%*/} | |
echo $dir | |
cd $dir | |
chmod 775 * | |
done |
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
// curl api.mycompany.com/v1/employees | |
[ | |
{ | |
"employeeId":"1", | |
"firstName":"Tim", | |
"surname":"Smith", | |
"links":[ | |
{ | |
"rel":"self", | |
"href":"http://api.mycompany.com/v1/employees/1" |
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
// curl api.mycompany.com/v1/summaries | |
[ | |
{ | |
"key":"Summary_2016_09_05_20_52_48", | |
"value":"http://api.mycompany.com/v1/summaries/Summary_2016_09_05_20_52_48.xls", | |
"links":[ | |
{ | |
"rel":"self", | |
"href":"http://api.mycompany.com/v1/summaries/Summary_2016_09_05_20_52_48" | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>React Counter</title> | |
</head> | |
<body> | |
<br/><br/> | |
<div id="app"></div> |
OlderNewer