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.io.* | |
import java.util.zip.ZipFile | |
/** | |
* UnzipUtils class extracts files and sub-directories of a standard zip file to | |
* a destination directory. | |
* | |
*/ | |
object UnzipUtils { |
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
even_letters = "bcdfghlmnprstwx" | |
odd_letters = "aeiou" | |
def format_uid_digit (n, level): | |
if n != 0: | |
letters = odd_letters if (level & 1) else even_letters | |
base = len(letters) | |
s = format_uid_digit(n / base, level + 1) | |
return s + letters[(n % base)] | |
return "" |
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
tasks.withType<Jar> { | |
manifest { | |
attributes["Main-Class"] = "com.example.MainKt" | |
} | |
} |
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
std::string GetStringTrackedDeviceProperty( vr::IVRSystem * pSystem, vr::TrackedDeviceIndex_t unDeviceIndex, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *pError ) | |
{ | |
vr::ETrackedPropertyError err = TrackedProp_Success; | |
std::string sRetVal; | |
char buf[32]; | |
uint32_t unPropLen = pSystem->GetStringTrackedDeviceProperty( unDeviceIndex, prop, buf, sizeof( buf ), &err ); | |
if ( err == vr::TrackedProp_Success ) | |
{ |
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 | |
cartella="/var/myfolder" | |
# update the file | |
curl -i -X PUT -H 'Authorization: token 4d013330xxxxxxxxxxxxxx' -d "{\"path\": \"mattei.csv\", \ | |
\"message\": \"update\", \"content\": \"$(openssl base64 -A -in $cartella/mattei.csv)\", \"branch\": \"master\",\ | |
\"sha\": $(curl -X GET https://api.github.com/repos/username/repo/contents/mattei.csv | jq .sha)}" \ | |
https://api.github.com/repos/username/repo/contents/mattei.csv |
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 is free and unencumbered software released into the public domain. | |
// | |
// Anyone is free to copy, modify, publish, use, compile, sell, or distribute | |
// this software, either in source code form or as a compiled binary, for any | |
// purpose, commercial or non-commercial, and by any means. | |
// | |
// In jurisdictions that recognize copyright laws, the author or authors of this | |
// software dedicate any and all copyright interest in the software to the | |
// public domain. We make this dedication for the benefit of the public at large | |
// and to the detriment of our heirs and successors. We intend this dedication |