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
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
Serial.write("hello"); | |
delay(1000); | |
} |
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
server { | |
server_name XXXXXX.ap-northeast-1.compute.amazonaws.com; | |
location / { | |
proxy_pass http://XXXXXXX.ap-northeast-1.es.amazonaws.com/; | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/.htpasswd; | |
} | |
} |
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
[ | |
{ | |
"SharedName": "Share1", | |
"SharedDirectoryPath": "E:\\shares1\\", | |
"PermitAccount": "Everyone", | |
"Permission": "Full", | |
"Quota": "500mb", | |
"VSS": { | |
"On": "E:", | |
"Size": "50%" |
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
$zippath = "c:\PSWindowsUpdate.zip" | |
Invoke-WebRequest "https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/41459/43/PSWindowsUpdate.zip" -Outfile $zippath | |
$zipfile = (new-object -com shell.application).Namespace($zippath) | |
$destinationPath = "$env:WINDIR\System32\WindowsPowerShell\v1.0\Modules" | |
$destination = (new-object -com shell.application).Namespace($destinationPath) | |
$destination.CopyHere($zipfile.Items()) | |
Import-Module PSWindowsUpdate | |
Get-WUInstall -AcceptAll -IgnoreReboot -AutoSelectOn -Confirm | |
Remove-Item $zippath |
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
$targets = @("08-00-27-9A-AB-94") | |
$nics = Get-NetAdapter | |
foreach ($nic in $nics) { | |
if ($targets -contains $nic.MACAddress) { | |
New-NetIPAddress -InterfaceIndex $nic.IfIndex -IPAddress "192.168.0.1" -AddressFamily IPv4 -PrefixLength 24 | |
} | |
} |
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
$header = @{ | |
"X-IIJmio-Developer" = "XXXXXX"; | |
"X-IIJmio-Authorization" = "XXXXX"; | |
} | |
$result = Invoke-WebRequest -Headers $header https://api..jp/mobile/d/v1/log/packet/ | |
$content = $result | ConvertFrom-Json | |
Write-Host $result | |
Write-Host $content | |
foreach ($line in $content.packetLogInfo) {iijmio | |
Write-Host $line.hddServiceCode |
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
exports.handler = function (event, context, callback) { | |
var https = require('https'); | |
var AWS = require('aws-sdk'); | |
var imsi = 'PUT YOUR IMSI'; | |
var to_mail_addr = 'PUT YOUR MAIL ADDRESS YOU RECIEVED ALERT MAIL'; | |
var from_mail_addr = 'PUT YOUR MAIL ADDRESS YOU SEND ALERT MAIL(SES)'; | |
var soracom_key = 'PUT YOUR SORACOM API KEY' | |
var soracom_token = 'PUT YOUR SORACOM API TOKEN' |
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
import slackweb | |
def lambda_handler(event, context): | |
slack = slackweb.Slack(url="YOUR WEBHOOK URL PUTS HERE") | |
slack.notify(text="Hello, World!!", channel="#YOUR CHANNEL HERE", username="USERNAME HERE", icon_emoji=":smiling_imp:") | |
return "succeeded" |
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
FROM jupyter/scipy-notebook | |
USER root | |
RUN mkdir -p /root/workspace/personal /root/workspace/project | |
WORKDIR /root/workspace | |
CMD ["jupyterhub-singleuser", "--allow-root"] |
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
image_name = "YOUR_CONTAINER_IMAGE_NAME" | |
network_name = "YOUR_DOCKER_NETWORK_NAME" | |
c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator' | |
from jupyter_client.localinterfaces import public_ips | |
c.JupyterHub.hub_ip = public_ips()[0] | |
c.JupyterHub.port = 8888 | |
from dockerspawner import DockerSpawner |
OlderNewer