Skip to content

Instantly share code, notes, and snippets.

View shenlebantongying's full-sized avatar
🔬
Writing thesis :)

shenleban tongying shenlebantongying

🔬
Writing thesis :)
View GitHub Profile
@Metaxal
Metaxal / select-or-send-sexp.rkt
Last active February 17, 2022 12:59
Send the current s-expression to the interactions window (quickscript)
#lang racket/base
(require quickscript
racket/list
racket/class
framework
racket/gui/base)
;;; Author: Laurent Orseau https://github.com/Metaxal
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
@pdarragh
pdarragh / papers.md
Last active February 23, 2025 02:04
Approachable PL Papers for Undergrads

Approachable PL Papers for Undergrads

On September 28, 2021, I asked on Twitter:

PL Twitter:

you get to recommend one published PL paper for an undergrad to read with oversight by someone experienced. the paper should be interesting, approachable, and (mostly) self-contained.

what paper do you recommend?

@robin-a-meade
robin-a-meade / unofficial-bash-strict-mode.md
Last active April 1, 2025 10:29
Unofficial bash strict mode

Unofficial Bash Strict Mode

Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:

set -euo pipefail

set -e

@briandfoy
briandfoy / briandfoy.sublime-color-scheme
Last active April 22, 2022 10:51
The sublime-text color scheme that I like
/*
Put this in ~/.config/sublime-text-3/Packages/User
*/
{
"name": "briandfoy",
"author": "brian d foy <[email protected]>",
"variables":
{
"black": "hsl(0,0%,0%)",
@gitaarik
gitaarik / git_submodules.md
Last active April 13, 2025 18:24
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@hi2p-perim
hi2p-perim / ssecheck.cpp
Last active January 10, 2025 09:47
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif
@gjorquera
gjorquera / console.cpp
Last active January 6, 2025 23:53
Qt way to read from stdin.
#include <iostream>
#include "console.hpp"
void Console::run()
{
std::cout << "First message" << std::endl;
std::cout << "> " << std::flush;
connect(m_notifier, SIGNAL(activated(int)), this, SLOT(readCommand()));
}