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
package main | |
import "os" | |
import "io" | |
import "encoding/json" | |
type MyWriters struct { | |
StandardOutput io.Writer | |
StandardError io.Writer | |
FileOutput io.Writer |
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 PrintList(IMyTextPanel panel, List<string> list) { | |
string str = ""; | |
for (int i = 0; i < list.Count; i++) { | |
str = str + list[i]; | |
} | |
panel.WritePublicText(str); | |
panel.ShowPublicTextOnScreen(); | |
} |
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
# Linux IPTables NAT Setup | |
It is important to ensure that the test-server has the proper routes. Else it will | |
receive the request, but be unable to respond. Thinking that the test-server works and | |
has proper routes when it in fact doesnt can lead to a world of troubles. | |
It can be beneficial to just disable the main iterface. | |
Test to make sure you can reach the internet from the internal test-machine | |
before trying to map a listening port to it. |
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
package main | |
import "fmt" | |
type Particle struct { | |
x int | |
y int | |
} | |
type ParticleEmitter struct { |
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
package main | |
import "fmt" | |
type Particle struct { | |
x int | |
y int | |
} | |
type ParticleEmitter struct { |
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
package main | |
import "github.com/andlabs/ui" | |
import "log" | |
import "reflect" | |
func main() { | |
go ui.Do(initGUI) | |
err := ui.Go() |
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
package main | |
// Simple webserver i golang | |
// Importere libraries og stuff | |
import "fmt" | |
import "net/http" | |
import "github.com/gorilla/mux" | |
// Main entry point i programmet. |
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
########################################################## | |
# # | |
# Installing Archlinux with Full Disk Encryption and LVM # | |
# # | |
########################################################## | |
# For the perfect setup, your disk should be overwritten by random data. Encrypted data should be indistinguishable from encrypted data. | |
# That way an adversary would not be able to determine where the encrypted portion starts. | |
# WARNING: This is an extremely taxing operation. This can take A DAY OR MORE TO COMPLETE. Not for the impatient. | |
dd if=/dev/urandom of=/dev/sda |
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
package main | |
import ( | |
"database/sql" | |
"log" | |
_ "github.com/bmizerany/pq" | |
) | |
/* Database and User creation in psql |
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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"log" | |
_ "github.com/bmizerany/pq" | |
) |
OlderNewer