Skip to content

Instantly share code, notes, and snippets.

View Flixbox's full-sized avatar
💭
Probably developing right now

Felix Tietjen Flixbox

💭
Probably developing right now
View GitHub Profile
@andrewdavey
andrewdavey / Object.inherit.js
Created July 3, 2012 14:15
Simple object inheritance in JavaScript
(function () {
"use strict";
var copyOwnProperties = function (from, to) {
for (var propertyName in from) {
if (from.hasOwnProperty(propertyName)) {
to[propertyName] = from[propertyName];
}
}
};
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@dancameron
dancameron / chartjs_responsive_ajax_example.html
Last active May 8, 2018 14:10
Responsive Chart.js Example with AJAX Callback
<canvas id="invoice_status_chart" min-height="300" max-height="500"></canvas>
<script type="text/javascript" charset="utf-8">
var invoice_status_data = {};
function invoice_status_chart() {
var can = jQuery('#invoice_status_chart');
var ctx = can.get(0).getContext("2d");
var container = can.parent().parent(); // get width from proper parent
@toast38coza
toast38coza / call_weather_service.py
Created August 29, 2014 08:25
Calling a SOAP WebService with Python Suds
from suds.client import Client
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"
client = Client(url)
print client ## shows the details of this service
result = client.service.GetWeatherInformation()
print result ## see: restult.txt below
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 30, 2024 00:35
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@JamesMGreene
JamesMGreene / .editorconfig
Created November 16, 2015 12:04
Example EditorConfig file
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
@davidebbo
davidebbo / web.config
Created January 16, 2016 20:52
Default web.config used for node.js apps on Azure Web Apps
<?xml version="1.0" encoding="utf-8"?>
<!--
This configuration file is required if iisnode is used to run node processes behind
IIS or IIS Express. For more information, visit:
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->
<configuration>
<system.webServer>
@DeflatedPickle
DeflatedPickle / MinecraftEnergyTypes.md
Last active June 10, 2024 11:00
A simple table for Minecraft energy types and a matrix for conversion rates.

Minecraft Energy Types


Energy Name Abbreviation Original Mod Version
Anima AM Anima-Mundi 1.11.2
Blutricity BE (NO) Redpower 1.6.4
Charge RP (NO)/Fz? Factorization 1.7.10
Crystal Flux CF Actually Additions 1.12
@adactio
adactio / minimal-serviceworker.js
Last active August 18, 2023 09:15
An attempt at a minimal viable service worker.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
// HTML files: try the network first, then the cache.
// Other files: try the cache first, then the network.
// Both: cache a fresh version if possible.
// (beware: the cache will grow and grow; there's no cleanup)
const cacheName = 'files';
@OleVik
OleVik / DiscordCustomizations.js
Last active November 22, 2018 13:32
TamperMonkey-script to tighten up Discord interface
// ==UserScript==
// @name Discord Custom CSS
// @version 1.4
// @author OleVik
// @include https://discordapp.com/*
// @include http://discordapp.com/*
// @exclude https://discordapp.com/invite/*
// @exclude http://discordapp.com/invite/*
// @exclude https://discordapp.com/oauth2/*
// @exclude http://discordapp.com/oauth2/*