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
extern crate bindgen; | |
extern crate cmake; | |
extern crate filetime; | |
use std::env; | |
use std::fs; | |
use filetime::FileTime; | |
fn generate_bindings(out_dir: &str) { | |
let ode_dir = format!("{}/build", out_dir); |
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
self: super: rec { | |
nixopsUnstable = super.nixopsUnstable.overrideAttrs (oldAttrs: { | |
preConfigure = '' | |
find . -iname azure_common.py -exec sed -i 's/NetworkResourceProviderClient/NetworkManagementClient/' {} \; | |
find . -iname azure_vm.py -exec sed -i 's/from azure.mgmt.network import PublicIpAddress, NetworkInterface, NetworkInterfaceIpConfiguration, IpAllocationMethod, PublicIpAddressDnsSettings, ResourceId/from azure.mgmt.network.models import PublicIPAddress, NetworkInterface, NetworkInterfaceIPConfiguration, IPAllocationMethod, PublicIPAddressDnsSettings\nfrom azure.mgmt.batchai.models import ResourceId/' {} \; | |
find . -iname azure_availability_set.py -exec sed -i 's/from azure.mgmt.compute import AvailabilitySet/from azure.mgmt.compute.models import AvailabilitySet/' {} \; | |
find . -iname azure_resource_group.py -exec sed -i 's/from azure.mgmt.resource import ResourceGroup/from azure.mgmt.resource.resources.models import ResourceGroup/' {} \; | |
find . -iname azure_storage.py |
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
[0] % nixops deploy -d bawebsite-ec2 | |
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/n | |
ixpkgs' does not exist, ignoring | |
error: value is null while a set was expected, at /nix/store/m0yxkvg915ws5z1yc | |
sblfx85nhf90p4b-nixpkgs-19.03pre161900.61c3169a0e1/nixpkgs/pkgs/top-level/defa | |
ult.nix:63:5 | |
error: evaluation of the deployment specification failed |
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
trait PrintError<E> { | |
fn print_err(self, message: &'static str) -> Self; | |
// The String type is allocated in the heap, so when a String is needed it's better to have a function that only allocates it in case it's necessary | |
fn print_err_with<F>(self, message_f: F) -> Self | |
where F: Fn(&E) -> String; | |
} | |
impl<T, E> PrintError<E> for Result<T, E> { | |
fn print_err(self, message: &'static str) -> Result<T, E> { |
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
{ | |
gitlab = { config, pkgs, ... }: { | |
deployment = { | |
targetEnv = "virtualbox"; | |
virtualbox.memorySize = 1024; | |
virtualbox.vcpu = 2; | |
}; | |
}; | |
} |
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
{ | |
webserver = { config, pkgs, ... }: { | |
deployment = { | |
targetEnv = "virtualbox"; | |
virtualbox.memorySize = 1024; | |
virtualbox.vcpu = 2; | |
}; | |
}; | |
} |
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
import MyApp from './lib/js/re/myApp.js'; | |
import { AppRegistry } from 'react-native'; | |
AppRegistry.registerComponent('momirreason', () => MyApp); |
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 ReactErratique; | |
module type ReactModule = { | |
type t 'a; | |
let map: eq::('b => 'b => bool)? => ('a => 'b) => t 'a => t 'b; | |
let create: eq::(unit => unit => bool)? => unit => (t unit, step::step? => unit => unit); | |
}; | |
module ComponentGenerator (R: ReactModule) => { | |
type action 'a = |
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 ReactErratique; | |
let initial = ref 0; | |
let (timeS, timeC) = S.create !initial; | |
Js.log timeS; | |
let timeIncrement () => { | |
initial := !initial + 1; |
NewerOlder