- Clean up NeonConfig issues #2 / #3
- Add documentation for NeonConfig to website
This file contains hidden or 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
| !(function(exports){var module; | |
| var Module;if(typeof Module==="undefined")Module={};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;((function(){var loadPackage=(function(metadata){function runWithFS(){var fileData0=[];fileData0.push.apply(fileData0,[45,45,32,77,97,107,101,32,119,105,110,100,111,119,32,111,98,106,101,99,116,32,97,32,103,108,111,98,97,108,10,119,105,110,100,111,119,32,61,32,106,115,46,103,108,111,98,97,108,59,10,10,100,111,32,45,45,32,67,114,101,97,116,101,32,106,115,46,105,112,97,105,114,115,32,97,110,100,32,106,115,46,112,97,105,114,115,32,102,117,110,99,116,105,111,110,115,46,32,97,116,116,97,99,104,32,97,115,32,95,95,112,97,105,114,115,32,97,110,100,32,95,95,105,112,97,105,114,115,32,111,110,32,74,83,32,117,115,101,114,100,97,116,97,32,111,98,106,101,99,116,115,46,10,9,108,111,99,97,108,32,95,80,82,79,88,89,95,77,84,32,61,32,100,101,98,117,103,46,103,101,116,114,101,103,105,115,116,114,121,40,41, |
This file contains hidden or 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
| local ok, bit = pcall(require, "bit") | |
| if not ok and bit32 then | |
| return bit32 | |
| elseif bit | |
| return bit | |
| else | |
| local bit = {} | |
| function bit.band(...) | |
| local args = {...} | |
| local bits |
This file contains hidden or 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
| if [ "x$1" = "x" ]; then | |
| echo "No file argument passed" | |
| fi | |
| dd if=/dev/zero of="$1" | |
| rm "$1" |
This file contains hidden or 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
| local function r(x) -- round to nearest even | |
| local y = x * 100 -- shift decimal right | |
| if math.floor(y) % 2 == 0 then -- even | |
| return math.floor(y) / 100 | |
| else | |
| return math.ceil(y) / 100 | |
| end | |
| end | |
| local function calculate(origin, salvage, usefullife) |
This file contains hidden or 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
| local function straight_line(start, salvage, years) | |
| local percentage = 1 / years | |
| local to_decline = start-salvage | |
| local depreciation = 0 | |
| for i=start, start-to_decline, -(to_decline) * percentage do | |
| -- ignore first line | |
| -- for some reason it doesn't work | |
| print(start-depreciation, to_decline * percentage, start-i, i) | |
| depreciation = depreciation + (to_decline * percentage) | |
| end |
This file contains hidden or 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
| rm -f /tmp/mirrorlist /tmp/mirrorlist.new || exit 1 | |
| sed "s/^#//" /etc/pacman.d/mirrorlist.pacnew > /tmp/mirrorlist | |
| rankmirrors /tmp/mirrorlist > /tmp/mirrorlist.new | |
| install -b /tmp/mirrorlist.new /etc/pacman.d/mirrorlist |
Object-oriented programming in Lua is an often-debated topic and people normally assume that Lua, by default, has no way to implement object-oriented programming. However, obviously, there are multiple ways to implement object-oriented programming, which I will demonstrate in this article.