Skip to content

Instantly share code, notes, and snippets.

# Constants for the initial state of the liquidity pool
x_initial = 1000 # Initial amount of Token A
y_initial = 1000 # Initial amount of Token B
k = x_initial * y_initial # Constant product k
delta_x = 100 # Amount of Token A being swapped
# New amount of Token A in the pool
x_final = x_initial + delta_x
# Calculate the new amount of Token B using the constant product formula
<FileZilla3>
<Settings>
<Setting name="Config Location">/Users/[Username]/Dropbox/Config/Preferences/filezilla/</Setting>
<Setting name="Kiosk mode">0</Setting>
<Setting name="Disable update check">0</Setting>
</Settings>
<Servers>
</Servers>
</FileZilla3>
<p>
email:
<script type="text/javascript">
// <![CDATA[
document.write(
"<n uers="znvygb:anzr@qbznva.pbz">".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
// ]]>
</script>
<span style="unicode-bidi:bidi-override; direction: rtl">moc.niamod@eman</span>
</a>
# mute startup chime
sudo nvram SystemAudioVolume=%80
# reenable startup chime.
sudo nvram -d SystemAudioVolume
@JohnPlummer
JohnPlummer / reboot.txt
Created June 14, 2014 09:22
Cron job to reboot the system at 3:35am
sudo crontab -e
30 3 * * * /sbin/shutdown -r +5 "About to reboot!"
@JohnPlummer
JohnPlummer / lock_osx.txt
Last active August 29, 2015 14:02
Lock OSX (but keep the account logged in.)
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
class HelloSbt {
def sayHello() = ""
}
heroku plugins:install https://github.com/heroku/heroku-labs.git
heroku labs:enable user_env_compile -a myapp
@JohnPlummer
JohnPlummer / error
Created February 14, 2012 22:07
Heroku and gemfile conditions
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* rb-fsevent
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app