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
{ | |
"action_manifest_version": 0, | |
"alias_info": {}, | |
"bindings": { | |
"/actions/main": { | |
"chords": [], | |
"haptics": [ | |
{ | |
"output": "/actions/main/out/HapticsLeft", | |
"path": "/user/hand/left/output/haptic" |
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 requests | |
import sys | |
import json | |
from qhue import Bridge | |
def getPrice(): | |
req = requests.get("https://api.spot-hinta.fi/JustNow") # please don't spam the API, max. 1 request per minute | |
return json.loads(req.content)["PriceWithTax"] | |
def getNormalizedPrice(price): # make price to be clamped and scaled such as 0-50 c/kWh -> 0-1 |
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
// To run this, create a new folder and inside it type: | |
// dotnet new console | |
// Then delete Program.cs, download this script into the folder and run with: | |
// dotnet run | |
using System.Security.Cryptography; | |
var random = new Random(); | |
var buffer = new byte[14]; |
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
murgo@Destiny:~/sompi$ time ./testspeed | |
Load at end: 939524097 | |
real 0m13.912s | |
user 0m13.912s | |
sys 0m0.000s | |
murgo@Destiny:~/sompi$ time ./testspeed_zerocheck | |
Load at end: 939524097 | |
real 0m14.144s | |
user 0m14.144s | |
sys 0m0.000s |
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
#!/usr/bin/env bash | |
die () { | |
echo >&2 "$@" | |
echo | |
echo "Usage:" | |
echo "duplicatefile.sh <originalFileLocation> <targetPath> <copyCount>" | |
echo | |
echo "Example usage: ./duplicatefile.sh file.txt . 5" | |
echo |
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
using System; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
namespace Assets.Scripts.Tools.Editor | |
{ | |
public class ComponentReplaceTool | |
{ |
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
<div> | |
Total iterations: | |
<span class="iterations">0</span> | |
</div> | |
<div> | |
Average count for complete collection: | |
<span class="averageCount">0</span> | |
<div> |
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
using System; | |
using System.IO; | |
using System.Linq; | |
namespace Wunderpahkina_vol6 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
Param([Parameter(Mandatory=$true)][string]$archiveFolder) | |
do { | |
# form name from git commit time and message | |
$name = & git show -s --format="%cI_%s" | |
$name = $name.replace(':', '.').replace(' ', '-'); | |
echo $name | |
# hack the watch and sourcemaps away | |
(Get-Content tsconfig.json) -replace '"watch": true', '"watch": false' | Set-Content tsconfig.json |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace Boggle | |
{ | |
public class Boggler | |
{ |
NewerOlder