Skip to content

Instantly share code, notes, and snippets.

View 330k's full-sized avatar

330k 330k

View GitHub Profile
@330k
330k / ExportMovie.nb
Last active January 4, 2016 13:50
Mathematica Function for Movie Creation with ffmpeg/avconv
(*
Mathematica Function for Movie Creation with ffmpeg/avconv
This function enables Mathematica make a long movie file
with less memory usage.
Copyright (c) 2015 330k
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*)
@330k
330k / ImportExportWithJLink.nb
Last active January 4, 2016 13:51
Import and Export Function of Mathematica/CDF Player with JLink
@330k
330k / disable_wupdate.js
Last active January 4, 2016 13:53
Disable Windows Update (e.g. GWX.exe) without WSUS Servers
/**********************************************************************
Disable Specified Windows Updates (KB******) without WSUS
Copyright (c) 2015 Kei Misawa
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
**********************************************************************/
try{
// KB numbers you want to disable
var disabledKBs = [
@330k
330k / formatFloatForLSDYNA.java
Created January 4, 2016 13:57
Fast Format Function of Float Numbers for LS-DYNA Input Files
private static String formatFloat10(double d){
char[] c = new char[10];
double a;
if(d == 0.0){
return " 0.0000000";
}
if(d < 0){
c[0] = '-';
a = -d;
@330k
330k / hubeny_simple.js
Last active March 14, 2022 18:40
Calculate Geodesic Distance with Hubeny 1st Order Formula in JavaScript
/**
* Hubeny測地線距離計算式(簡易)
* @param {number} lat1
* @param {number} lon1
* @param {number} lat2
* @param {number} lon2
* @return {number} distance [m]
*/
function hubeny(lat1, lon1, lat2, lon2){
"use strict";
@330k
330k / sqltool.hta
Created January 13, 2016 10:56
HTML Application SQL Tool with ADODB
<html>
<head>
<!--
HTA SQL Tool by 330k
Copyright (c) 2016 330k
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
-->
<title>HTA SQL Tool by 330k</title>
<HTA:APPLICATION ID="USQLEXE" APPLICATIONNAME="USQLEXE" BORDER="thick" BORDERSTYLE="normal"
@330k
330k / get-hops.sh
Created April 12, 2019 11:39
Get hop count the host (without traceroute)
#!/bin/bash
DEST=${1:-8.8.8.8}
MAXHOP=${2:-31}
IPV="-4"
# Ctrl + Cで中断
trap 'echo Breaked; exit 2' 2
# そもそも届かなければ終了
@330k
330k / watch_packet_loss.sh
Created May 18, 2020 15:09
どんなときもWi-Fi通信監視用 ping継続監視ワンライナー
while true; do echo -n `date '+%Y/%m/%d %H:%M:%S'`; ping -c 5 1.1.1.1 | sed -z 's/,/\n/g' | egrep 'duplicates|packet loss|rtt' | sed -z 's/\n/, /g'; echo; done
@330k
330k / watch_global_ip.sh
Created May 18, 2020 15:14
どんなときもWi-Fi通信監視用 グローバルIP変化監視スクリプト
#!/bin/bash
IP_OLD=""
while true
do
IP=`curl -m 3 -s http://inet-ip.info`
if [[ ${IP} =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
if [[ "$IP" != "$IP_OLD" ]]; then
IP_OLD="$IP"
function Get-ChildFilePath {
<#
.SYNOPSIS
Get-ChildFilePath returns a list of file paths of children recursively.
This supports long file name (>256 characters).
.DESCRIPTION
Get-ChildFilePath returns an array of string of full path,
in contrast to Get-ChildItem, which returns an array of object.
Get-ChildFilePath is twice as Get-ChildItem.
.PARAMETER Path