Skip to content

Instantly share code, notes, and snippets.

use std::cmp;
/// Position within a line
pub type Pos = usize;
/// Text zipper
pub struct Zip<'a> {
/// Lines before the current line
prev: Vec<&'a str>,
pub fn toString(&self) -> String {
self.up.push(& self.cur);
self.up.extend(self.down.into_iter());
self.up.join("\n")
}
pub mod text;
use text::zip::fromString;
use text::zip::toString;
fn main() {
println!("{}", fromString("a").toString())
}
# Generated by iptables-save v1.6.2 on Mon Jul 9 10:34:48 2018
*nat
:PREROUTING ACCEPT [1742:117923]
:INPUT ACCEPT [1740:117217]
:OUTPUT ACCEPT [32:2676]
:POSTROUTING ACCEPT [32:2676]
COMMIT
# Completed on Mon Jul 9 10:34:48 2018
# Generated by iptables-save v1.6.2 on Mon Jul 9 10:34:48 2018
*raw
eval $(xdotool getmouselocation --shell)
while :; do
XOLD=$X
YOLD=$Y
eval $(xdotool getmouselocation --shell)
[ $(( XOLD - X )) -gt 10] && echo "Down swipe"
sleep 0.1
done
nixops create ./ops/config.nix ./ops/ec2.nix -d deployment
{ pkgs, ... }:
{
imports = [ { nix.binaryCachePublicKeys = [ "uwu" ]; } ];
boot.loader.grub.enable = false;
fileSystems."/".device = "x";
nixpkgs.config.overlays = self: super: {
bootstrapFiles = {};
stdenv = super.stdenv // {
# bootstrapTools = abort "blargh";
string = "s7 test"
for k, v in string.gmatch(string, "(%S+)%s(%S+)") do
_G[k] = v
end
print(s7)
string = "s7 test"
for k, v in string.gmatch(string, "(%S+)%s(%S+)") do
_G[k] = v
end
print(s7)
-- | This file is part of AdrianParvin.
-- |
-- | AdrianParvin is free software: you can redistribute it and/or modify
-- | it under the terms of the GNU General Public License as published by
-- | the Free Software Foundation, either version 3 of the License, or
-- | (at your option) any later version.
-- |
-- | AdrianParvin is distributed in the hope that it will be useful,
-- | but WITHOUT ANY WARRANTY; without even the implied warranty of
-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the