Skip to content

Instantly share code, notes, and snippets.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@FiloSottile
FiloSottile / 32.asm
Last active November 7, 2024 06:51
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@alvincrespo
alvincrespo / gist:f864fa846d3fc9364475
Last active August 29, 2015 14:21
fly-css-framework/src/styles/states/_panel.scss
// Components :: Panels
// Panels
//
// Panels are one the more versatile component within the Fly framework. They are used to provide visual sectioning for content. Panels provid a subtle border, and content placed within a ``.fly-panel-body`` is provided with padding.
//
// Styleguide 3.25
// Basic Panel
//
@alvincrespo
alvincrespo / gist:9e57623dcf60265bca2f
Last active August 18, 2022 17:34
fly-components/addon/components/fly-panel.js
// fly-components/addon/components/fly-panel.js
import Ember from 'ember';
import layout from '../templates/components/fly-panel';
export default Ember.Component.extend({
tagName: 'div',
classNames: ['fly-panel'],
layout: layout,
header: null,
subHeader: null,
@lattner
lattner / TaskConcurrencyManifesto.md
Last active November 15, 2024 05:45
Swift Concurrency Manifesto
@Azoy
Azoy / syscall.swift
Last active August 25, 2023 21:49
Raw system calls in Swift
// macOS x86_64 syscall works as follows:
// Syscall id is moved into rax
// 1st argument is moved into rdi
// 2nd argument is moved into rsi
// 3rd argument is moved into rdx
// ... plus some more
// Return value is stored in rax (where we put syscall value)
// Mac syscall enum that contains the value to correctly call it
enum Syscall: Int {
@DougGregor
DougGregor / swift_cxx_interop_first_steps.md
Created July 18, 2019 17:32
First steps for Swift/C++ interoperability

First steps for Swift/C++ Interoperability

Just a quick brain dump of "first steps" to move Swift/C++ interoperability forward. While there are many big and interesting design questions for a good interoperability story, there are also a large number of implementation tasks that can proceed independently of those design discussions (and often in parallel). This list focuses on those implementation tasks:

  1. (DONE) Add a flag -enable-cxx-interop to the frontend, and have it enable (Objective-)C++ mode in the Clang importer.
  2. Add a lit configuration flag to enable -enable-cxx-interop for the full Swift testsuite and fix all of the issues that prevent (Objective-)C code from being imported correctly when it's compiled as C++. The testsuite will likely need a lot of extern "C" annotations throughout it's headers---those fixes can be committed to the testsuite behind appropriate #ifdefs.
  3. Import C++ namespaces as Swift enums that have no cases (so-called "uninhabited enums") so the C++ lexical struct
@lorentey
lorentey / Atomics.md
Last active October 29, 2024 18:56
[pitch] Low-Level Atomic Operations ⚛︎
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv