The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
#!/usr/bin/env lua | |
--- | |
-- @author Gianluca Fiore | |
-- @copyright 2012, Gianluca Fiore <[email protected]> | |
-- | |
-- | |
-- Open a url with feh, if it leads to an image, or firefox, in all | |
-- other cases. Trivial but very useful with cli newsreaders (like | |
-- newsbeuter) to quickly preview images and to not have to switch to |
#!/bin/sh | |
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# Set up to start the X server ASAP, then let the startup run in the | |
# background while we set up other stuff. | |
XAUTH_FILE="/var/run/chromelogin.auth" | |
MCOOKIE=$(head -c 8 /dev/urandom | openssl md5) # speed this up? |
# Copyright (c) 2016 The crouton Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
## Filename: /etc/init/crouton.conf | |
## NOTE: 'rootfs' verification needs to be removed. | |
## crouton chroot - Start session | |
## | |
## This will start a (crouton) chroot Desktop Environment session |
To remove a submodule you need to:
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
In spring 2017, GNOME Terminal
and iTerm2
have changed this.
GNOME Terminal
is based on the VTE
widget, and almost all of this work went to VTE
. As such, we expect other VTE
-based terminal emulators to catch up and add support really soon. Other terminal emulators are also welcome and encouraged to join!
/* | |
Tested against release/1.4 branch of https://github.com/Microsoft/ChakraCore | |
commit: 6f4c890505a58bbf198035d4b93bf8a726033af3 | |
The below program will work on x86_64 Linux. It demonstrates how to safely call | |
in to libChakraCore from Spidermonkey using js-ctypes. Because the ChakraCore | |
GC scans the stack for JsValueRefs we must allocate JsValueRefs on the C stack. | |
When I say C stack I mean in the memory region between the current stack | |
pointer and the initial value of the stack pointer when the program started. |
Components.utils.import("resource://gre/modules/ctypes.jsm") | |
var liblog = ctypes.open('liblog.so'); | |
var android_log = liblog.declare("__android_log_write", | |
ctypes.default_abi, | |
ctypes.int32_t, | |
ctypes.int32_t, | |
ctypes.char.ptr, | |
ctypes.char.ptr); |