Skip to content

Instantly share code, notes, and snippets.

This is a list of instructions on how to add virtual ram to ubuntu 18.04 starting with a brand new Digital Ocean droplet. On Linux virtual ram is usually referred to as swap so moving worward I will reffer to it that way. There are few things to keep in mind about this: first of all using swap on SSD decreases the longevity of the hardware so DO might not be happy about this, second usually on Linux swap exist on a seperate partition and not as a file so the benefits might be limited.

First let's check if swap is enabled. If you are using a fresh DO droplet it will not be.

Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libqt5scintilla2-12v5 : Depends: libqt5core5a (>= 5.4.0) but it is not going to be installed
/*
main.cpp userspace main loop for Intel Galileo family boards
Copyright (C) 2014 Intel Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
@frecel
frecel / test.py
Created September 22, 2015 04:13
#!/usr/bin/env python3
users = ['Artur', 'Mims', 'anonymous']
passwords = ['11', '22', '']
username = input('What is your username? ')
userPassword = input("What's the secret password?")
i = 0
while i < len(users):
if users[i] == username:
@frecel
frecel / test.py
Created September 22, 2015 04:11
#!/usr/bin/env python3
users = ['Artur', 'Mims', 'anonymous']
passwords = ['11', '22', '']
username = input('What is your username? ')
userPassword = input("What's the secret password?")
i = 0
while i < len(users):
if users[i] == username:
#! /usr/bin/env python3
import http.client
conn = http.client.HTTPConnection("sprunge.us")
conn.request("POST", "/", "sprunge=sdfsdggfhdbdfvdervgdgfghfghgf")
resp = conn.getresponse()
print(resp.status, resp.reason)
print(resp.read())
var aniend = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
function classSwapper(element, oldClass, newClass) {
element.className = element.className.replace(oldClass, newClass);
}
function layerClassChanger(slide){
var i = 0;
slide.children.forEach(function (e) {
i++;
var aniend = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
function layerClassChanger(slide){
var i = 0;
slide.children.forEach(function (e) {
i++;
e.className = "layer" + i.toString() + " slide-item animated phase" + i.toString();
});
}
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.
==========================
Version
artur@artur-desktop:~/Downloads/cube_source/src$ make
make -C ../enet all
make[1]: Entering directory `/home/artur/Downloads/cube_source/enet'
Making all in include
make[2]: Entering directory `/home/artur/Downloads/cube_source/enet/include'
Making all in enet
make[3]: Entering directory `/home/artur/Downloads/cube_source/enet/include/enet'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/artur/Downloads/cube_source/enet/include/enet'
make[3]: Entering directory `/home/artur/Downloads/cube_source/enet/include'