I hereby claim:
- I am alexandernyquist on github.
- I am alexandern (https://keybase.io/alexandern) on keybase.
- I have a public key whose fingerprint is ABC8 2A84 7ECA 7AC4 4A46 076E 9297 0F1E B5FD EF16
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Function FindRec($filepattern, $pattern) { | |
Get-ChildItem -Recurse -Include $filepattern | Select-String -Pattern $pattern | Group path | Select name | |
} |
<?php | |
$data = json_decode($json, true); | |
uasort($data['allresults'], function($a, $b) { | |
$aSalary = $a['results'][0]['salary']; | |
$bSalary = $b['results'][0]['salary']; | |
return $bSalary < $aSalary; | |
}); |
<?php | |
$search = 'annonsmannen'; | |
$fileName = 'movies.list'; // From ftp://ftp.sunet.se/pub/tv+movies/imdb/movies.list.gz | |
$fp = fopen($fileName, 'r'); | |
for(;;) { | |
$line = fgets($fp); | |
if($line === false) { | |
print('Reached end of file. Movie not found'); | |
break; |
#!/bin/sh | |
echo "-----" | |
echo "Deploying" | |
echo "-----" | |
# Update sourcecode | |
git pull | |
# Update composer | |
composer install |
Here, I will discuss one of the conspiracy theories regarding the attack on Malaysia Airline flight MH17. This will not be about formulating yet another theory - or blaming anyone for what happened. I will focus purely on independently verifyable technical matters.
If you want to follow along, you will need these tools:
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/alexandernyquist/gin" // at 30ea9c06fc9cac893f10d6ad0847a510cf35aeaf | |
) | |
func main() { | |
r := gin.NewWithConfig(gin.Config{ | |
CacheSize: 5, |
package main | |
import ( | |
"fmt" | |
"github.com/gin-gonic/gin" | |
) | |
func CORSMiddleware() gin.HandlerFunc { | |
return func(c *gin.Context) { | |
c.Writer.Header().Set("Content-Type", "application/json") |
{{define "body"}} | |
This is the start page. | |
<br><br> | |
Check out <a href="/user/5">user 5</a> or <a href="/user/7">user 7</a>. | |
{{end}} | |
Hello world, {{.Name}}! |