Skip to content

Instantly share code, notes, and snippets.

View eric15342335's full-sized avatar
🔭
Broadening my horizons

Cheng Ho Ming, Eric eric15342335

🔭
Broadening my horizons
View GitHub Profile
  • Shall i implement it?
  • No ...

Smallest MSVC executable via compiler flags

Description

Goals:

  • Compile the following program hello.c:
#include <stdio.h>
@andrewstiefel
andrewstiefel / feed.xml
Created January 24, 2022 18:43
Simple XSL boilerplate for styling Atom feeds in Jekyll
---
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/" rel="alternate"/>
@nixpulvis
nixpulvis / gem-reset
Last active September 22, 2024 20:05
Remove all non default gems. For ruby 2.0.0
#!/usr/bin/env ruby
# Remove all gems EXCEPT defaults :)
`gem list -d`.split(/\n\n^(?=\w)/).each do |data|
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/)
name = match[:name]
versions = match[:versions].split(', ')
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/)
next if match[1].empty? # it's the only version if this match is empty