From 72eb4be6d1db176f38fb93c172bde61d914a16c1 Mon Sep 17 00:00:00 2001 From: TriMill Date: Wed, 5 Apr 2023 13:59:22 -0400 Subject: [PATCH] initial commit --- CONTRIBUTING | 1 + LICENSE | 13 +++++++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ media/eyes.gif | Bin 0 -> 5493 bytes media/now.png | Bin 0 -> 3933 bytes media/wtfpl.png | Bin 0 -> 2975 bytes ramdl | 21 +++++++++++++++++++++ ramdl_server | 20 ++++++++++++++++++++ 8 files changed, 88 insertions(+) create mode 100644 CONTRIBUTING create mode 100644 LICENSE create mode 100644 README.md create mode 100644 media/eyes.gif create mode 100644 media/now.png create mode 100644 media/wtfpl.png create mode 100755 ramdl create mode 100755 ramdl_server diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 0000000..d961924 --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1 @@ +please don't diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..49876cd --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ee9b6c --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# ramdl: download moar RAM (100% reel no scamz no hackz) + +Is your computer constantly low on memory? Need more dedotated wam for your minecraft server? Want to run [modern](https://code.visualstudio.com/), [21st century](https://hyper.is/) [software](https://github.com/aleksey-hoffman/sigma-file-manager)? + +With `ramdl`, downloading more RAM has never been so easy. Gone are the days of [slow, inefficient](https://downloadmoreram.com/) RAM downloading methods. Downloading more RAM is as simple as following these three easy steps: + +1. Obtain access to a server with plenty of RAM +2. Run the `ramdl_server` script as root on the server +3. Run the `ramdl` script as root on your PC + +## `ramdl_server` + +Usage: `# ramdl_server ` + +For example, to create a 1G ramdisk at `/mnt/ramdl`, run `# ramdl_server /mnt/ramdl 1G`. The script will create the directory if it does not already exist. + +To unmount the ramdisk, simply `# umount `. + +## `ramdl` + +Usage: `# ramdl ` + +For example, if the previous command was run from `example.com`, we could mount it to `/mnt/downloaded-ram` with `# ramdl user@example.com:/mnt/ramdl /mnt/downloaded-ram`. + +## Disclaimer + +PLEASE DO NOT run `ramdl` on a real machine. as the downloaded ram is very slow, it is quite likely that corruption will occur. + +`ramdl_server` *should* be safe to run on a real machine (i have done so to great success), but i take no responsibility for what happens if you do. + +![WTFPL Icon](./media/wtfpl.png) +![Download RAM](./media/now.png) +![Best viewed with eyes](./media/eyes.gif) diff --git a/media/eyes.gif b/media/eyes.gif new file mode 100644 index 0000000000000000000000000000000000000000..6dfeb6494fcc9ab87c9587299f33f5a4c883a38f GIT binary patch literal 5493 zcmeI$do+~m8UXO284S`e<2qr`p5)e$CXw5?mrJ<}l8M1E<-TWP2HRlVl9*CR+h}Z& z`#mAMMj{NA_8_}rQtlzQt!$3kXRUMAIeYDO&L8Kp_VWGl{_(zRec!v*_j{h_eO@aY zOTDAsZU9BV0N~350)cQi+?ve(t=P*92BWpLbz@^=YisN4;y(^bTO#%r&Q4~gCoOce zP`miH*OfNC0!XA#{euT1A|kZHNrB&n5J*}+AwdVdgNZ@j{zM;PVY6^QZ<3!cB7#T? zK$!k@8ewH)iNGRIT1O8F<0%M7qJIDhK?*_G`VmM7r|p+Sc!&ETY=V8X07~mXp|0(3 zX?)qwm#qVUTaYIC9l*~%SEN9w6HTp?GBe&~IBj(@SE(o>WD;KWH z){=s3;5esWfM}9cLu%o)(;YV};_de4_dPge5*OXuoDd{$K}Af&LtZsb6kKqns3%d5*@05> z+6_JIEtIM~2=leSW9(f6+F>?Wc>ks*~|T;*C_7?H#N$kW%^Ri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-&#hSZ!5_0b<#LxxML|R9 zKQ5e)jP=|6_E@+F@#j58&Y9pwL7lO_g_$JD>Rukd3k3i;c4G0nP}Bbb8Oop|GEeO600000NkvXXu0mjf(7TdV literal 0 HcmV?d00001 diff --git a/media/wtfpl.png b/media/wtfpl.png new file mode 100644 index 0000000000000000000000000000000000000000..d039d0b9c044cf195d3d0ea6a0c11d0b0b44fc94 GIT binary patch literal 2975 zcmWkw2RK|?7rnX+AxaQY5+u=s-y3c8(LyHSP4I?@7A-`L9>nO08ok#{1Wy-?-g^nc z==DV#y#yiu$-VoW^WAgrcfY;%-fNv5{uHHg9mWoWAn3Z5CQ=WqhG1}0Q-ax|2et?n zN^@-uB=q~wo!yB02zIVHY5wC1K{QN%1__j!&IUHA+_WC6QO(lcX63r6{nx!O;GM7* zQW*w?v~*%N6!$PC)iH1t-AA`xX-}gg=_TO~_U0wI;^S1U zG3VWOsaLj_7Fu$nVFHl_A`wf3&%A2F)de@l5(Ngts@la`2E+y~iZ9yb!(2Mq#igHdoeM=? zUS4u?vXU5EkX|7YgJG}2h>Y9)B^{+I&CxYA#a65@wCyhEtH5n3aZ686FMGl+XVm6S ztmYN{Y*PEHZ% zUf$%C6q4b?8{x>9{FEuN?>?RJ-Jl-1y1cMm>r3E^)m&dN zmUmo{j>Tqi;?I`{M5Y<<_Yu;2}DH#@kvltdtO=oODf9v}avs;(ocF%(8Wd!|-i zUhd&WDj*<$HZahDr$qw)GZ0>J2L}f%v@NbKWu4}&-Q51P*w%noZ^FaFM>gC>Y$RhI z6*%GN$_#~pQ3tCGh{EA4vKe%k5*Ao6sYxj-h!GnXSJ%LR4zoey#SVVz>c6z)eQ&dJ z!?L#*?zD7tqKJsSGv6xkuq=%#V`PsEnfJSJuyb%IC^9JhHZVYY=BwaRXY97WtTx^3 zuUPUNpU4cOc&4xaEk`x9#~wa*bR-ErIq*bSmK(0)cboDar@?iNjnhqiV>OX)-n_Ad zr)?ZHCDC@7%R^I{uJcHa(cP9Crky0Zw3h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L?I-L1$HY3ya0px^2WMB_$Us{rk+Z|sg85$Z28MQ(3Gn=0+ z>ytDAWbsJinj_63P+6ze7{Zf-bH}yP*A43^T zQ_XvAG$Ww?1!df~*=XdWR?5sfVfmjv1^(~?j1h}!_>Sd0tePRZZeB4}SPinnsqk}L z3699hcD>R`8pPICX>-?To(AC%ORo?{ulVc6%a<>8dmjMaOiWCOvC(?2L`vnF@O|vv z+bk;0t*>Wyc6R=NzfMV(nwm=9TiwvW!O?ve(D+A|f7j8`Q3Dhm9sS#YB(c}>Y0*US zV8RhW*U8f}IpY0$3XR6)W%JF=O-7DegI52Wn4BDw+ig%ast@J&uf;Y`z2L+R8e{IdM7yuhKhdU~<(>+BG1XjohJ#rF94 zc)Nkqwm<11&avq%1Q4Tg#VfOINi109F6H*#o>+BF&9~K6zRHx6=&=5^+(w^Mz1Oe* zU6fBrNg1D=)oC@2Nk={SOHxv}!Q~}Cb1rc5v$vDEIgi71RXF?Y+r5?&AQ{YcbFV9A zh~tx!8hDT0PXG+#`%bj3uJQ}NvwN3kKeASxqkFVs?&vHL4jr{`e#Z=NU;3(FmHd~dAi2Ih`9&ihr<(DL@>xd5WtTy6_(cua5xRZ zBR4vrCzTXkx^k_Jp_mT40w*+h? z5{c{U>n)DWmm#C0y6y|gf(bn0;tX|lb^M~DU1ao#fHB;YmB|;ScP||;!V?VWMF}I(){#brjs;nXgf*TU%l`h@&X<8jC2;zN<&&|DCEB?rh)$l DP#wl; literal 0 HcmV?d00001 diff --git a/ramdl b/ramdl new file mode 100755 index 0000000..319e3a7 --- /dev/null +++ b/ramdl @@ -0,0 +1,21 @@ +#!/bin/sh + +# ramdl + +ramdl_script() { + printf "Mounting sshfs at '%s' to '%s'\n" "$1" "$2" + sshfs "$1" "$2" || exit 1 + printf "Making swap\n" + mkswap "$2"/ramdl || exit 1 + printf "Making loopback device\n" + losetup -f "$2"/ramdl || exit 1 + loopdev="$(losetup -j "$2"/ramdl | cut -d":" -f1)" + printf "Swapping\n" + swapon "$loopdev" || exit 1 +} + +if [ "$#" -eq 2 ]; then + ramdl_script "$1" "$2" || (printf "Failure\n"; exit 1) && printf "Success\n" +else + printf "Wrong argument count\n"; exit 1 +fi diff --git a/ramdl_server b/ramdl_server new file mode 100755 index 0000000..87a5aeb --- /dev/null +++ b/ramdl_server @@ -0,0 +1,20 @@ +#!/bin/sh + +# ramdl_server + +ramdl_script() { + printf "Creating ramdisk at %s of size %s\n" "$1" "$2" + mkdir -p "$1" || exit 1 + chown root:root "$1" || exit 1 + mount -t ramfs -o size="$2" "ramdl_disk" "$1" || exit 1 + printf "Creating swapfile\n" + dd if=/dev/zero of="$1/ramdl" bs="$2" count=1 || exit 1 + printf "Setting permissions\n" + chmod -R 777 "$1" || exit 1 +} + +if [ "$#" -eq 2 ]; then + ramdl_script "$1" "$2" || (printf "Failure\n"; exit 1) && printf "Success\n" +else + printf "Wrong argument count\n"; exit 1 +fi