A dashboard-style admin interface built using CSS Grid, with a Flexbox fallback for older browsers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::rc::Rc; | |
trait HKT<U> { | |
type C; // Current type | |
type T; // Type with C swapped with U | |
} | |
macro_rules! derive_hkt { | |
($t:ident) => { | |
impl<T, U> HKT<U> for $t<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (..) | |
import Html exposing (..) | |
import Html.App as App | |
import Html.Events exposing (onClick) | |
import Req exposing (..) | |
import Dict exposing (Dict) | |
main : Program Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: git total [OPTION...] | |
# | |
# Options: | |
# | |
# In theory, the command accepts all command line options supported by | |
# the "git log" command. In reality, however, only few commit-limiting | |
# options are useful. This includes: | |
# | |
# --author=PATTERN, --committer=PATTERN | |
# Displays the number of lines changed by a certain author. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cef_app_capi.h" | |
#include "cef_auth_callback_capi.h" | |
#include "cef_base_capi.h" | |
#include "cef_browser_capi.h" | |
#include "cef_browser_process_handler_capi.h" | |
#include "cef_callback_capi.h" | |
#include "cef_client_capi.h" | |
#include "cef_command_line_capi.h" | |
#include "cef_context_menu_handler_capi.h" | |
#include "cef_cookie_capi.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Net | |
// exception handling in async using Async.Catch | |
let fetchAsync (name, url:string) = | |
async { | |
let uri = new System.Uri(url) | |
let webClient = new WebClient() | |
let! html = Async.Catch (webClient.AsyncDownloadString(uri)) | |
match html with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port module Spelling exposing (..) | |
import Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import String | |
main = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script | |
# ~/.ssl/sign-all-modules.sh | |
# Place all files in ~/.ssl folder | |
mkdir ~/.ssl | |
cd ~/.ssl | |
# Generate custom keys with openssl | |
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(unboxed_closures)] | |
#![feature(fn_traits)] | |
use std::collections::BTreeMap; | |
struct IncIdGen(i32); | |
impl FnOnce<()> for &mut IncIdGen { | |
type Output = i32; | |
extern "rust-call" fn call_once(self, _args: ()) -> Self::Output { | |
self.0 += 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::marker::PhantomData; | |
use std::convert::TryInto; | |
use std::sync::Arc; | |
use std::ops::Deref; | |
use std::sync::mpsc::channel; | |
#[derive(Debug)] | |
struct MsgOne { | |
} |
OlderNewer