⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
# Ubuntu upstart file at /etc/init/ejabberd.conf | |
respawn | |
respawn limit 20 5 | |
start on runlevel [2345] | |
stop on runlevel [06] | |
script | |
exec start-stop-daemon --start --name ejabberd --user ejabberd --chuid ejabberd --exec /usr/local/sbin/ejabberdctl -- start |
ldap_server auth1 { | |
url "ldap://vmcentos64:389/ou=Users,ou=Accounts,dc=acme,dc=com?cn?sub?(objectClass=*)"; | |
binddn "cn=manager,dc=acme,dc=com"; | |
binddn_passwd password; | |
group_attribute cn; | |
group_attribute_is_dn on; | |
require valid_user; | |
} | |
# |
var MyApp = angular.module('MyApp'); | |
MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
var msgBus = {}; | |
msgBus.emitMsg = function(msg, data) { | |
data = data || {}; | |
$rootScope.$emit(msg, data); | |
}; | |
msgBus.onMsg = function(msg, func, scope) { | |
var unbind = $rootScope.$on(msg, func); | |
if (scope) { |
{ | |
"annotations": { | |
"list": [ | |
{ | |
"$$hashKey": "object:690", | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", |
// Add to Cargo.toml | |
// [dependencies] | |
// winapi = "*" | |
// user32-sys = "*" | |
extern crate winapi; | |
extern crate user32; | |
fn from_wide_ptr(ptr: *const u16) -> String { | |
use std::ffi::OsString; | |
use std::os::windows::ffi::OsStringExt; |
<script context="module"> | |
import { get, readable } from 'svelte/store' | |
import { createClient, operationStore } from '@urql/svelte' | |
import { browser, dev } from '$app/env' | |
/** | |
* @type {import('@sveltejs/kit').Load} | |
*/ |
Build a NixOS config, copy it to a tmpfs, and enter it, shutting the running userspace (but not the kernel) down. This can be useful e.g. for repartitioning the system or switching it to a new zfs pool, without the need for extra installation media, and is a little faster than most other volatile system methods (e.g. kexec, classic USB or CD installer), since the store is in RAM and uncompressed right from the get-go. It also copies the SSH host keys from the building system to maintain the chain of trust in a remote system.
package main | |
import ( | |
"compress/gzip" | |
"io" | |
"net/http" | |
"strings" | |
) | |
// Gzip Compression |
I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.
The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.
You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.