Skip to content

Instantly share code, notes, and snippets.

@mulepiemmason
mulepiemmason / pointers_and_arrays.c
Created May 29, 2020 21:02 — forked from mrnugget/pointers_and_arrays.c
Kind of a cheat sheet for pointers and arrays in C
#include <stdio.h>
int main(int argc, char *argv[])
{
// Taken from here: http://denniskubes.com/2012/08/19/pointers-and-arrays-in-c/
// initialize an array of ints
int numbers[5] = {1,2,3,4,5};
// standard array notation
@mulepiemmason
mulepiemmason / wget.sh
Created May 29, 2020 18:42 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
window.WebSocket = window.WebSocket || window.MozWebSocket;
var websocket = new WebSocket('ws://127.0.0.1:9000',
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;