Skip to content

Instantly share code, notes, and snippets.

@ufukty
ufukty / README.md
Created February 11, 2023 16:46 — forked from JamesMessinger/README.md
VSCode GitHub Markdown Theme

GitHub Markdown Theme for Visual Studio Code

This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body class with the body tag so it would work in VSCode, and added styling for the html tag to match GitHub's fixed-width container.

Instructions

  1. Copy the CSS file to your computer
    Copy the github-markdown.css file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file.

  2. Edit your VSCode settings
    If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them

@ufukty
ufukty / grav.cpp
Created March 10, 2021 07:58 — forked from dmh43/grav.cpp
A simple physics simulator with OpenGL
#include <GL/freeglut.h>
#include <vector>
#include <cmath>
const double pi = 3.141593;
typedef struct PhysVector {
float x;
float y;
};
@ufukty
ufukty / iptables.sh
Created September 22, 2020 21:34 — forked from Tristor/iptables.sh
Simple IPtables script for an OpenVPN server
#!/bin/bash
# Flushing all rules
iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT
iptables -X
# Setting default filter policy
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
@ufukty
ufukty / floating-ip-gateway.sh
Last active July 12, 2021 07:11 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic)
#!/bin/bash
# Force outbound traffic through the attached floating IP
NET_INT="eth0"
CURL_TIMEOUT=3
echo -n "Setting floating IP as the default gateway: "
# Check there's a floating IP attached to this droplet
if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then