This file contains hidden or 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
// Seq.unfold (https://msdn.microsoft.com/en-us/library/ee340363.aspx) | |
// works with a generator function that gets a state and returns | |
// Some (element, state) to generate another iterator, or | |
// None to stop the iteration. | |
// The problem is that tuples are allocated every single iteration. | |
// | |
// The solution below uses instead a generator function that gets | |
// a state and an iterator function. The iterator function can be called | |
// to yield a new element and set a new state for the next iterator. If the | |
// generator function returns a unit, i.e. (), the iteration stops. |
This file contains hidden or 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
// | |
// This is in fact a thin wrapper around QueryPerformanceCounter() and QueryPerformanceFrequency(). | |
// When those are not available it falls back to System.DateTime.UtcNow.Ticks. | |
// This module is based on the C# code of StopWatch. | |
// See: http://referencesource.microsoft.com/#System/services/monitoring/system/diagnosticts/Stopwatch.cs | |
// | |
open System.Runtime.InteropServices | |
open System.Runtime.Versioning |
This file contains hidden or 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
" VIM keyboard layout for Yiddish and Hebrew | |
" based on the Mac keyboard layout by Jack (Yosl) and Shoshke-Reyzl Juni | |
" (url: http://www.shoshke.net/) | |
" Adapted to VIM by Ya'ar Hever | |
" Last Updated: Sun Aug 16 22:22:22 CEST 2015 | |
" Use this short name in the status line. | |
let b:keymap_name = "UYIP" | |
loadkeymap | |
a <char-0x5e9> " ש - shin |
This file contains hidden or 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
function! MultiWordThesaurus() | |
" if a thesaurus is already open, abort. | |
if pumvisible() || &thesaurus == "" | |
return 0 | |
endif | |
" mark the cursor position | |
silent exec "normal! mt" | |
" take a window of 6 words |
This file contains hidden or 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
#r "FSharp.Compiler.Service.dll" | |
open System.IO | |
open Microsoft.FSharp.Compiler.SourceCodeServices | |
let checker = FSharpChecker.Create () | |
let filesource1 = """ | |
module Abc | |
let x = 1 | |
let y = x + 1 |
This file contains hidden or 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
#!/bin/bash | |
if [[ $(getconf LONG_BIT) == "64" ]]; then | |
setup_file="setup-x86_64.exe" | |
else | |
setup_file="setup-x86.exe" | |
fi | |
wget -N "https://cygwin.com/$setup_file" -P /usr/local/bin |
This file contains hidden or 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
" Alternative Vim Keymap file for hebrew | |
" Created by: Ya'ar Hever | |
" Last Updated: 09/08/2015 23:13:10 | |
" Use this short name in the status line. | |
let b:keymap_name = "heb-lyx" | |
loadkeymap | |
a <char-0x5e9> " ש - shin | |
b <char-0x5e0> " נ - nun | |
c <char-0x5d1> " ב - bet |
This file contains hidden or 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
license: cc-by-4.0 | |
border: no | |
height: 800 |
This file contains hidden or 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
# credit to Peter L on StackOverflow: | |
# https://stackoverflow.com/questions/32753190/how-to-get-numeric-keypad-arrows-working-with-java-applications-on-linux/32753332#32753332 | |
#!/bin/bash | |
SYMBOLS="/usr/share/X11/xkb/symbols" | |
KEYPAD="$SYMBOLS/keypad" | |
# create a backup in a temporary directory | |
TMP=$(mktemp -d) |
This file contains hidden or 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
#!/usr/bin/env bash | |
# This bug is well documented and still not fixed for a long time: | |
# https://bugs.launchpad.net/gnome-screensaver/+bug/872701 | |
# This script is inspired by two scripts that were submitted on askubuntu.com | |
# to fix this issue in Gnome and in Unity: | |
# http://askubuntu.com/a/803418/472924 | |
# http://askubuntu.com/a/857652/472924 |
OlderNewer