Skip to content

Instantly share code, notes, and snippets.

Neceros / ref.html
Last active Mar 28, 2020
HTML5 Cheat Sheet
View ref.html
<!-- Tells the browser to render the page using the HTML5 specification -->
1. HyperText Markup Language : Uses tags to tell the browser how to layout the web page
2. Uniform Resource Locator :
a. http:// is used if data is transfered using the HyperText Transfer Protocol (Common standard of communication between web servers)
b. The domain is the unique name for the server / servers hosting the data
c. The URL ends with the path to the data to be served
Neceros /
Last active Oct 3, 2016
How do I get a each field within Event to be random, and not correlate with itself? When I call a new Event I wish each of the fields to have a random entry from the database.
from django.db import models
class Event(models.Model):
subject = models.CharField(max_length=256)
what = models.CharField(max_length=512)
where = models.CharField(max_length=256)
extra = models.CharField(max_length=1024)
def __str__(self):
from django.shortcuts import render
from django.views.generic import View
from .models import Event
class EventsList(View):
model = Event
title = 'Events'
View in the template.html
{% block js %}
$(document).ready(function (e) {
var subjects = {{ subjects|safe }};
var whats = {{ whats|safe }};
var wheres = {{ wheres|safe }};
var extras = {{ extras|safe }};
function generateEvents() {
var events_html = '';
Neceros / style.css
Created Feb 20, 2017
The best Clearfix
View style.css
.clearfix {zoom: 1}
.clearfix:after {
content: ".";
clear: both;
display: block;
height: 0;
visibility: hidden;
Neceros / ResearchProjects_HP_Power.xml
Created Aug 22, 2019
Fixed Higher Power research project
View ResearchProjects_HP_Power.xml
<?xml version="1.0" encoding="utf-8" ?>
<label>advanced power</label>
<description>Allows you to build advanced power buildings.</description>
Neceros / Just the patch
Created Aug 24, 2019
Rimcuisine 2.0 Coffee Patch
View Just the patch
<!--=========================== Non-Food ==============================-->
<ThingDef Name="RC2_CoffeeBase" ParentName="RC2_PlantBase" Abstract="true">
<label>coffee bush</label>
<description>Coffee! This bean is used the worlds over for its caffeine content and delicious taste (when roasted and brewed). Can only be grown in arid regions.</description>
View gist:937fa1f7d720ce02e9394ba150b34325
<ThingDef ParentName="BuildingBase">
<label>SRTS Mk.III: Phoenix</label>
<description>The Phoenix offers similar fuel efficiency to the Albatross, but with an increased fuel reserve and carry capacity. Additionally, the Mk.II is harder to kill and uses less materials in its construction at the cost of some advanced chemistry.</description>
<volume>(0.1, 0.1, 0.1)</volume>
View gist:81671a54526f6100d8cd5328d56b3670
<?xml version="1.0" encoding="utf-8" ?>
<Operation Class="PatchOperationReplace">
View ShipComponents.xml
<?xml version="1.0" encoding="utf-8" ?>
<ThingDef Name="SRTSCompBase" Abstract="True">