working on it ...

Filters

Explore Public Snippets

Sort by

Found 19 snippets

    public by DavidEGrayson  2517  0  3  0

    This is a copy of https://meta.discourse.org/t/certain-info-strings-on-fenced-code-blocks-break-formatting-between-the-blocks/42467

    This is a copy of https://meta.discourse.org/t/certain-info-strings-on-fenced-code-blocks-break-formatting-between-the-blocks/42467: discourse_fence_bug.md
    I just encountered a bug while I was writing a post on a Discourse-powered forum and would like to report it.
    
    It seems like if I have two fenced code blocks with an info string of "{.cpp}", where each block starts with a line equal to "\`\`\`{.cpp}" and ends with a line equal to "\`\`\`", then any text formatting between the two blocks of code does not work at all, and we see the markup instead of seeing nicely-formatted text.  See below for an example:
    
    ```{.cpp}
    // Here is a block of C++ code.
    ```
    
    For some reason we cannot have `monospace`, _italic_, **bold**, or [link](https://example.com) text in this paragraph, which is between two blocks of C++ code.  In fact, I can't find any other Markdown, BBCode or HTML that does work in this area.
    
    We can't even have multiple paragraphs.
    
    ```{.cpp}
    // Here is a second block of C++ code.
    ```
    
    A workaround for this is to remove the `{.cpp}` info string on the first code block, but of course that destroys the code highlighting in that first block.  I couldn't find any better solution even though I tried info strings of ".cpp", "cpp", and "c++".
    
    I made a [copy of this post as a Gist](https://gist.github.com/DavidEGrayson/05e71787bd36139f59088f59101a04a5) so you can see the markup I used and verify that it works correctly in GitHub-flavored Markdown.
    
    --David
    
    

    public by David Grayson  1340  0  3  0

    YAML from perk worked

    YAML from perk worked: yaml_worked.txt
    $ ~/Documents/scraps/test_midipix/perk.exe -Ip yaml /usr/bin/ls.exe | ruby -ryaml -e "p YAML.load(ARGF)"
    {"msys-intl-8.dll"=>["libintl_bindtextdomain", "libintl_dcgettext", "libintl_gettext", "libintl_setlocale", "libintl_textdomain"], "msys-2.0.dll"=>["__assert_func", "__ctype_ptr__", "__cxa_atexit", "__errno", "__getreent", "__locale_mb_cur_max", "__main", "_dll_crt0", "_exit", "_impure_ptr", "abort", "acl", "btowc", "calloc", "clock_gettime", "closedir", "cygwin_internal", "dirfd", "dll_dllcrt0", "error", "exit", "fclose", "fflush_unlocked", "fprintf", "fputs_unlocked", "free", "fstat", "fwrite", "fwrite_unlocked", "getenv", "getgrgid", "getgrnam", "getopt_long", "getpwnam", "getpwuid", "gettimeofday", "ioctl", "isatty", "iswcntrl", "iswctype", "iswprint", "localeconv", "localtime", "longjmp", "lstat", "malloc", "mbrtowc", "mbsinit", "mbsrtowcs", "mbstowcs", "memchr", "memcmp", "memcpy", "memmove", "mempcpy", "memset", "mktime", "msys_detach_dll", "nl_langinfo", "opendir", "optarg", "optind", "posix_memalign", "printf", "program_invocation_name", "program_invocation_short_name", "putc_unlocked", "raise", "readdir", "readlink", "realloc", "setjmp", "setlocale", "sigaction", "sigaddset", "sigemptyset", "sigismember", "signal", "sigprocmask", "sprintf", "stat", "stpcpy", "stpncpy", "strcasecmp", "strcat", "strchr", "strcmp", "strcoll", "strcpy", "strdup", "strftime", "strlen", "strncmp", "strrchr", "strstr", "strtoul", "strtoumax", "tcgetpgrp", "tolower", "toupper", "towlower", "wcscat", "wcslen", "wcstombs", "wcswidth", "wctype", "wcwidth", "wmemchr", "wmemcpy"], "KERNEL32.dll"=>["GetACP", "GetModuleHandleA", "GetModuleHandleW", "GetProcAddress"]}
    
    
    

    public by David Grayson  167615  1  3  0

    Yaml is cool.

    Yaml is cool.: yaml_demo.txt
    $ cat stuff.yaml 
    abc.dll:
    - tolower
    - wcslen
    USER32.dll:
    - MessageBoxW
    - stuff
    
    $ ruby -ryaml -e "p YAML.load(ARGF)" < stuff.yaml 
    {"abc.dll"=>["tolower", "wcslen"], "USER32.dll"=>["MessageBoxW", "stuff"]}
    
    

    public by David Grayson  1841  0  3  0

    How to check if an a variable is defined as an array in Bash

    How to check if an a variable is defined as an array in Bash: defined_as_array.sh
    foo=" hi declare -a foo"
    bar=(a b)
    
    lint_var_defined_as_non_array() {
        if [[ "${!1+x}" == "" ]]; then
            return 1  # not defined
        fi
        if [[ "$(declare -p $1)" == "declare -a "* ]]; then
            return 1  # defined as an array
        fi
        return 0
    }
    
    lint_var_defined_as_array() {
        if [[ "${!1+x}" == "" ]]; then
            return 1  # not defined
        fi
        if [[ "$(declare -p $1)" == "declare -a "* ]]; then
            return 0  # defined as an array
        fi
        return 1
    }
    
    if lint_var_defined_as_non_array foo; then
      echo foo is non array
    fi
    
    if lint_var_defined_as_non_array bar; then
      echo bar is non array
    fi
    
    if lint_var_defined_as_non_array car; then
      echo car is non array
    fi
    
    
    if lint_var_defined_as_array foo; then
      echo foo is array
    fi
    
    if lint_var_defined_as_array bar; then
      echo bar is array
    fi
    
    if lint_var_defined_as_array car; then
      echo car is array
    fi
    
    

    public by David Grayson  1250  0  3  0

    to the moon!

    to the moon!: tothemoonguy.txt
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    Learning about PGP (°◡°)
    -----BEGIN PGP SIGNATURE-----
    
    iQIcBAEBCgAGBQJWOBJXAAoJEOit7wARLpAOGg8P+wUKkeUUpX8DqmAyMLT0Na9W
    fOTZndhkj3Os/cda4vBIQq0pCP8oFKz9hFz52hLAp4sGgfo3kD2oaESo8LSqOfGq
    gsjEhobA2qm0lZlsM4ADD1JHMlSUALB1LCGtkYaGxtKEMjuX9iCU3PqSGdKp/MiZ
    tx6ph1jOXU7rDrBEAZl4hvS8DufTL40rG8O38RAB/PtiJMWcm64SzOpS+xz+zsKZ
    3rreXXmHYgZnxvDpJtNKa72uErEh0yTwJHKKK6GNnLyg1kr3h5SPI1yqJX/Kun+j
    q2mGL9HUlgYYcITZ6fHo6xlFolOxYi7fO1sQtudY+ld+A95QtuYDS7SkzxvvIXgb
    BKsoTO7qufaYk9dk2FNy4k/rcRp89Yr3q9QaRit1J2vLysj31sbLulJiXNlsotJg
    OgtV9VKiHCJeuq9KPdM4pkiVYFf0laOMb/U+Wn3aTT6SESOdJzyiqBjlayQWbsuZ
    9E+l5MTurnIwdLGF0djc6KieYpkzDdEjMBAXzo+4K4WmZBt6Vds8ArwlpR2SXgdC
    JCqrcjlg6c48EdzuHdSqtVTiZVYRhV/uVHLc2aSorC9wOSTmiPEGvvfe/HgWGmVn
    bGGR3TakSpV0F6AWobFUbew55PybQvyteP9klT3qCq8cMtLC6LfkKFeMe5+P9pSY
    ZDtm7ABvx+FTAuKFppwm=caqb
    -----END PGP SIGNATURE-----
    
    

    public by DavidEGrayson  1900  0  3  0

    Python cryptography dependencies

    Python cryptography dependencies: py-crypto-deps.md
    [cryptography](https://pypi.python.org/pypi/cryptography)
    - idna >= 2.0
    - pyasn1 >= 0.1.8
    - [six](https://pypi.python.org/pypi/six) >= 1.4.1 - [mingw-packages](https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python-six)
    - [setuptools](https://pypi.python.org/pypi/setuptools) - [mingw-packages](https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python-setuptools)
    - [enum34](https://pypi.python.org/pypi/enum34)
    - ipaddress
    - cffi >= 1.1.0
      - Does not compile cleanly with MSYS2's pip
    
    

    public by DavidEGrayson  351066  2  3  0

    Trying to install the cryptography pip in MSYS2 with mingw-w64-x86_64-python2-pip.

    Trying to install the cryptography pip in MSYS2 with mingw-w64-x86_64-python2-pip.: output.txt
    $ pip install -U cryptography
    Collecting cryptography
      Downloading cryptography-1.0.2.tar.gz (332kB)
    Collecting idna>=2.0 (from cryptography)
      Downloading idna-2.0-py2.py3-none-any.whl (61kB)
    Collecting pyasn1>=0.1.8 (from cryptography)
      Downloading pyasn1-0.1.9-py2.py3-none-any.whl
    Collecting six>=1.4.1 (from cryptography)
      Downloading six-1.10.0-py2.py3-none-any.whl
    Collecting setuptools (from cryptography)
      Downloading setuptools-18.4-py2.py3-none-any.whl (462kB)
    Collecting enum34 (from cryptography)
      Downloading enum34-1.0.4.tar.gz
    Collecting ipaddress (from cryptography)
      Downloading ipaddress-1.0.14-py27-none-any.whl
    Collecting cffi>=1.1.0 (from cryptography)
      Downloading cffi-1.2.1.tar.gz (335kB)
    Collecting pycparser (from cffi>=1.1.0->cryptography)
      Downloading pycparser-2.14.tar.gz (223kB)
    Installing collected packages: idna, pyasn1, six, setuptools, enum34, ipaddress, pycparser, cffi, cryptography
      Found existing installation: setuptools 18.3.2
        Uninstalling setuptools-18.3.2:
          Successfully uninstalled setuptools-18.3.2
      Running setup.py install for enum34
        Complete output from command D:/msys64/mingw64/bin/python2.exe -c "import setuptools, tokenize;__file__='c:/users/david/appdata/local/temp/pip-build-ojokdu/enum34/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\david\appdata\local\temp/pip-egkxlc-record/install-record.txt --single-version-externally-managed --compile:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "D:/msys64/mingw64/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module>
            from setuptools.extension import Extension
          File "D:/msys64/mingw64/lib/python2.7/site-packages/setuptools/extension.py", line 9, in <module>
            from . import msvc9_support
          File "D:/msys64/mingw64/lib/python2.7/site-packages/setuptools/msvc9_support.py", line 2, in <module>
            import distutils.msvc9compiler
          File "D:/msys64/mingw64/lib/python2.7/distutils/msvc9compiler.py", line 306, in <module>
            raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
        distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
    
        ----------------------------------------
    Command "D:/msys64/mingw64/bin/python2.exe -c "import setuptools, tokenize;__file__='c:/users/david/appdata/local/temp/pip-build-ojokdu/enum34/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\david\appdata\local\temp/pip-egkxlc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:/users/david/appdata/local/temp/pip-build-ojokdu/enum34
    
    
    

    public by David Grayson  1482  1  3  0

    list of packages install in Appveyor's MSYS2

    list of packages install in Appveyor's MSYS2: appveyor_msys_packages.txt
    asciidoc 8.6.9-4
    autoconf 2.69-3
    autoconf2.13 2.13-2
    autogen 5.18.4-2
    automake-wrapper 10-1
    automake1.10 1.10.3-3
    automake1.11 1.11.6-3
    automake1.12 1.12.6-3
    automake1.13 1.13.4-4
    automake1.14 1.14.1-3
    automake1.15 1.15-2
    automake1.6 1.6.3-2
    automake1.7 1.7.9-2
    automake1.8 1.8.5-3
    automake1.9 1.9.6-2
    bash 4.3.042-1
    bash-completion 2.1-5
    bison 3.0.4-1
    bsdcpio 3.1.2-5
    bsdtar 3.1.2-5
    bzip2 1.0.6-2
    ca-certificates 20141019-2
    catgets 1.1-2
    cmake 3.2.3-1
    coreutils 8.23-4
    crypt 1.1-6
    curl 7.42.1-1
    dash 0.5.8-1
    db 5.3.28-2
    diffstat 1.58-1
    diffutils 3.3-3
    docbook-xml 4.5-2
    docbook-xsl 1.78.1-3
    dos2unix 7.3-1
    expat 2.1.0-2
    file 5.24-1
    filesystem 2015.04-3
    findutils 4.5.14-4
    flex 2.5.39-4
    gawk 4.1.3-1
    gcc-libs 4.9.2-4
    gdb 7.9-1
    gdbm 1.11-3
    gettext 0.19.4-1
    glib2 2.44.1-1
    gmp 6.0.0-3
    gnupg 1.4.19-1
    gperf 3.0.4-3
    grep 2.21-1
    groff 1.22.3-1
    gyp-svn r1945-1
    gzip 1.6-1
    help2man 1.47.1-1
    icu 51.2-2
    inetutils 1.9.2-1
    info 5.2-5
    intltool 0.51.0-2
    lemon 3.8.7.0-1
    less 471-1
    libarchive 3.1.2-5
    libasprintf 0.19.4-1
    libbz2 1.0.6-2
    libcatgets 1.1-2
    libcrypt 1.1-6
    libcurl 7.42.1-1
    libdb 5.3.28-2
    libexpat 2.1.0-2
    libffi 3.2.1-1
    libgc 7.2.d-1
    libgcrypt 1.6.3-1
    libgdbm 1.11-3
    libgettextpo 0.19.4-1
    libgpg-error 1.20-1
    libguile 2.0.11-3
    libiconv 1.14-2
    libidn 1.30-1
    libintl 0.19.4-1
    libltdl 2.4.6-1
    liblzma 5.2.1-1
    liblzo2 2.09-1
    libmetalink 0.1.2-2
    libnettle 3.1-1
    libopenssl 1.0.2.a-1
    libp11-kit 0.23.1-1
    libpcre 8.36-2
    libpcre16 8.36-2
    libpcre32 8.36-2
    libpcrecpp 8.36-2
    libpcreposix 8.36-2
    libpipeline 1.4.0-1
    libreadline 6.3.008-4
    libsqlite 3.8.8.2-1
    libssh2 1.4.3-3
    libtasn1 4.5-1
    libtool 2.4.6-1
    libunistring 0.9.6-1
    libunrar 5.2.7-1
    libutil-linux 2.26.2-1
    libxml2 2.9.2-2
    libxslt 1.1.28-7
    mingw-w64-x86_64-ca-certificates 20150426-2
    mingw-w64-x86_64-cairo 1.14.2-2
    mingw-w64-x86_64-cairomm 1.11.2-2
    mingw-w64-x86_64-cmake 3.3.1-1
    mingw-w64-x86_64-cppunit 1.13.2-4
    mingw-w64-x86_64-crt-git 5.0.0.4531.49c7046-1
    mingw-w64-x86_64-curl 7.44.0-1
    mingw-w64-x86_64-expat 2.1.0-6
    mingw-w64-x86_64-fontconfig 2.11.94-5
    mingw-w64-x86_64-freetype 2.6-2
    mingw-w64-x86_64-gcc 5.2.0-3
    mingw-w64-x86_64-gcc-ada 5.2.0-3
    mingw-w64-x86_64-gcc-fortran 5.2.0-3
    mingw-w64-x86_64-gcc-libgfortran 5.2.0-3
    mingw-w64-x86_64-gcc-libs 5.2.0-3
    mingw-w64-x86_64-gcc-objc 5.2.0-3
    mingw-w64-x86_64-gdb 7.10-1
    mingw-w64-x86_64-gdbm 1.11-3
    mingw-w64-x86_64-gdk-pixbuf2 2.31.6-1
    mingw-w64-x86_64-gettext 0.19.5.1-1
    mingw-w64-x86_64-glib2 2.44.1-4
    mingw-w64-x86_64-glibmm 2.44.0-2
    mingw-w64-x86_64-gmp 6.0.0-3
    mingw-w64-x86_64-gnome-common 3.14.0-2
    mingw-w64-x86_64-gnutls 3.4.4.1-1
    mingw-w64-x86_64-gtk2 2.24.28-1
    mingw-w64-x86_64-gtkmm 2.24.4-3
    mingw-w64-x86_64-harfbuzz 1.0.3-1
    mingw-w64-x86_64-headers-git 5.0.0.4531.49c7046-1
    mingw-w64-x86_64-hicolor-icon-theme 0.15-2
    mingw-w64-x86_64-isl 0.14.1-2
    mingw-w64-x86_64-jasper 1.900.1-4
    mingw-w64-x86_64-jsoncpp 1.6.2-2
    mingw-w64-x86_64-libarchive 3.1.2-7
    mingw-w64-x86_64-libcroco 0.6.8-3
    mingw-w64-x86_64-libffi 3.2.1-3
    mingw-w64-x86_64-libiconv 1.14-5
    mingw-w64-x86_64-libidn 1.32-2
    mingw-w64-x86_64-libjpeg-turbo 1.4.1-1
    mingw-w64-x86_64-libmangle-git 5.0.0.4509.2e5a9a2-1
    mingw-w64-x86_64-libpng 1.6.18-1
    mingw-w64-x86_64-librsvg 2.40.10-1
    mingw-w64-x86_64-libsigc++ 2.5.4-1
    mingw-w64-x86_64-libssh2 1.6.0-2
    mingw-w64-x86_64-libsystre 1.0.1-2
    mingw-w64-x86_64-libtasn1 4.5-2
    mingw-w64-x86_64-libtiff 4.0.5-1
    mingw-w64-x86_64-libtre-git r122.c2f5d13-4
    mingw-w64-x86_64-libwinpthread-git 5.0.0.4538.78dca70-1
    mingw-w64-x86_64-libxml2 2.9.2-6
    mingw-w64-x86_64-lzo2 2.09-2
    mingw-w64-x86_64-make 4.1.2351.a80a8b8-1
    mingw-w64-x86_64-mpc 1.0.3-2
    mingw-w64-x86_64-mpfr 3.1.3.p0-2
    mingw-w64-x86_64-ncurses 6.0.20150627-2
    mingw-w64-x86_64-nettle 3.1.1-2
    mingw-w64-x86_64-ninja 1.6.0-1
    mingw-w64-x86_64-openssl 1.0.2.d-1
    mingw-w64-x86_64-p11-kit 0.23.1-3
    mingw-w64-x86_64-pango 1.37.4-1
    mingw-w64-x86_64-pangomm 2.36.0-2
    mingw-w64-x86_64-pixman 0.32.6-3
    mingw-w64-x86_64-pkg-config 0.28-5
    mingw-w64-x86_64-python2 2.7.10-4
    mingw-w64-x86_64-readline 6.3.008-1
    mingw-w64-x86_64-rtmpdump-git r499.a107cef-3
    mingw-w64-x86_64-shared-mime-info 1.4-2
    mingw-w64-x86_64-tcl 8.6.4-2
    mingw-w64-x86_64-termcap 1.3.1-2
    mingw-w64-x86_64-tk 8.6.4-2
    mingw-w64-x86_64-tools-git 5.0.0.4531.49c7046-1
    mingw-w64-x86_64-windows-default-manifest 6.4-2
    mingw-w64-x86_64-winpthreads-git 5.0.0.4538.78dca70-1
    mingw-w64-x86_64-wxWidgets 3.0.2-11
    mingw-w64-x86_64-xz 5.2.1-3
    mingw-w64-x86_64-zlib 1.2.8-9
    mintty 1322-2
    mpfr 3.1.2.p11-1
    msys2-keyring r8.3864337-1
    msys2-runtime 2.2.1.16643.a6f68ef-1
    msys2-runtime-devel 2.2.1.16643.a6f68ef-1
    ncurses 5.9.20150110-1
    openssl 1.0.2.a-1
    p11-kit 0.23.1-1
    pacman 4.2.1.6198.439d376-1
    pacman-mirrors 20141223-1
    patch 2.7.5-1
    patchutils 0.3.3-2
    pcre 8.36-2
    perl 5.22.0-2
    perl-Locale-Gettext 1.05-4
    perl-Module-Build 0.4212-1
    perl-Test-Pod 1.50-1
    perl-XML-Parser 2.44-1
    perl-YAML-Syck 1.29-1
    pkg-config 0.28-2
    pkgfile 15-1
    python2 2.7.10-1
    python2-setuptools 15.2-1
    rcs 5.9.4-1
    lndir 1.0.3-1
    m4 1.4.17-4
    make 4.1-4
    man-db 2.7.1-1
    mingw-w64-i686-adwaita-icon-theme 3.16.2-1
    mingw-w64-i686-atk 2.16.0-2
    mingw-w64-i686-atkmm 2.22.7-3
    mingw-w64-i686-binutils 2.25.1-1
    mingw-w64-i686-bzip2 1.0.6-4
    mingw-w64-i686-c-ares 1.10.0-2
    mingw-w64-i686-ca-certificates 20150426-2
    mingw-w64-i686-cairo 1.14.2-2
    mingw-w64-i686-cairomm 1.11.2-2
    mingw-w64-i686-cmake 3.3.1-1
    mingw-w64-i686-cppunit 1.13.2-4
    mingw-w64-i686-crt-git 5.0.0.4531.49c7046-1
    mingw-w64-i686-curl 7.44.0-1
    mingw-w64-i686-expat 2.1.0-6
    mingw-w64-i686-fontconfig 2.11.94-5
    mingw-w64-i686-freetype 2.6-2
    mingw-w64-i686-gcc 5.2.0-3
    mingw-w64-i686-gcc-ada 5.2.0-3
    mingw-w64-i686-gcc-fortran 5.2.0-3
    mingw-w64-i686-gcc-libgfortran 5.2.0-3
    mingw-w64-i686-gcc-libs 5.2.0-3
    mingw-w64-i686-gcc-objc 5.2.0-3
    mingw-w64-i686-gdb 7.10-1
    mingw-w64-i686-gdbm 1.11-3
    mingw-w64-i686-gdk-pixbuf2 2.31.6-1
    mingw-w64-i686-gettext 0.19.5.1-1
    mingw-w64-i686-glib2 2.44.1-4
    mingw-w64-i686-glibmm 2.44.0-2
    mingw-w64-i686-gmp 6.0.0-3
    mingw-w64-i686-gnome-common 3.14.0-2
    mingw-w64-i686-gnutls 3.4.4.1-1
    mingw-w64-i686-gtk2 2.24.28-1
    mingw-w64-i686-gtkmm 2.24.4-3
    mingw-w64-i686-harfbuzz 1.0.3-1
    mingw-w64-i686-headers-git 5.0.0.4531.49c7046-1
    mingw-w64-i686-hicolor-icon-theme 0.15-2
    mingw-w64-i686-isl 0.14.1-2
    mingw-w64-i686-jasper 1.900.1-4
    mingw-w64-i686-jsoncpp 1.6.2-2
    mingw-w64-i686-libarchive 3.1.2-7
    mingw-w64-i686-libcroco 0.6.8-3
    mingw-w64-i686-libffi 3.2.1-3
    mingw-w64-i686-libiconv 1.14-5
    mingw-w64-i686-libidn 1.32-2
    mingw-w64-i686-libjpeg-turbo 1.4.1-1
    mingw-w64-i686-libmangle-git 5.0.0.4509.2e5a9a2-1
    mingw-w64-i686-libpng 1.6.18-1
    mingw-w64-i686-librsvg 2.40.10-1
    mingw-w64-i686-libsigc++ 2.5.4-1
    mingw-w64-i686-libssh2 1.6.0-2
    mingw-w64-i686-libsystre 1.0.1-2
    mingw-w64-i686-libtasn1 4.5-2
    mingw-w64-i686-libtiff 4.0.5-1
    mingw-w64-i686-libtre-git r122.c2f5d13-4
    mingw-w64-i686-libwinpthread-git 5.0.0.4538.78dca70-1
    mingw-w64-i686-libxml2 2.9.2-6
    mingw-w64-i686-lzo2 2.09-2
    mingw-w64-i686-make 4.1.2351.a80a8b8-1
    mingw-w64-i686-mpc 1.0.3-2
    mingw-w64-i686-mpfr 3.1.3.p0-2
    mingw-w64-i686-ncurses 6.0.20150627-2
    mingw-w64-i686-nettle 3.1.1-2
    mingw-w64-i686-ninja 1.6.0-1
    mingw-w64-i686-openssl 1.0.2.d-1
    mingw-w64-i686-p11-kit 0.23.1-3
    mingw-w64-i686-pango 1.37.4-1
    mingw-w64-i686-pangomm 2.36.0-2
    mingw-w64-i686-pixman 0.32.6-3
    mingw-w64-i686-pkg-config 0.28-5
    mingw-w64-i686-python2 2.7.10-4
    mingw-w64-i686-readline 6.3.008-1
    mingw-w64-i686-rtmpdump-git r499.a107cef-3
    mingw-w64-i686-shared-mime-info 1.4-2
    mingw-w64-i686-tcl 8.6.4-2
    mingw-w64-i686-termcap 1.3.1-2
    mingw-w64-i686-tk 8.6.4-2
    mingw-w64-i686-tools-git 5.0.0.4531.49c7046-1
    mingw-w64-i686-windows-default-manifest 6.4-2
    mingw-w64-i686-winpthreads-git 5.0.0.4538.78dca70-1
    mingw-w64-i686-wxWidgets 3.0.2-11
    mingw-w64-i686-xz 5.2.1-3
    mingw-w64-i686-zlib 1.2.8-9
    mingw-w64-x86_64-adwaita-icon-theme 3.16.2-1
    mingw-w64-x86_64-atk 2.16.0-2
    mingw-w64-x86_64-atkmm 2.22.7-3
    mingw-w64-x86_64-binutils 2.25.1-1
    mingw-w64-x86_64-bzip2 1.0.6-4
    mingw-w64-x86_64-c-ares 1.10.0-2
    rebase 4.4.1-6
    repman-git r23.87bf865-1
    scons 2.3.4-4
    sed 4.2.2-2
    swig 3.0.7-1
    tar 1.28-3
    texinfo 6.0-1
    texinfo-tex 6.0-1
    tftp-hpa 5.2-1
    time 1.7-1
    tzcode 2015.b-1
    unrar 5.2.7-1
    util-linux 2.26.2-1
    wget 1.16.3-1
    which 2.21-1
    xmlto 0.0.26-2
    xz 5.2.1-1
    zlib 1.2.8-3
    
    

    public by David Grayson  197490  1  3  0

    PowerShell script for setting up MSYS2, might not totally work yet

    PowerShell script for setting up MSYS2, might not totally work yet: msys2-prepare.ps1
    Add-Type -Assembly System.IO.Compression.FileSystem
    $webclient = New-Object System.Net.WebClient
    
    function Acquire($file, $url, $checksum)
    {
      if (!(Test-Path $file))
      {
        "Downloading $url ..."
        $webclient.DownloadFile($url, $file)
      }
      else
      {
        "Using existing $file."
      }
      ls
      $actual_checksum = (Get-FileHash $file)[0].Hash.ToLower()
      if (!($checksum -eq $actual_checksum))
      {
        throw "Error: Checksum for $file is $actual_checksum expected $checksum"
      }
    }
    
    $ver = "20150916"
    $msys2_archive = "msys2-base-x86_64-$ver.tar.xz"
    Acquire -File $msys2_archive `
      -Url "http://repo.msys2.org/distrib/x86_64/$msys2_archive" `
      -Checksum "1eac63be7bfff979846dfda0aef6e2b572bc526450586de6364b08aaf642b843"
    
    Acquire -File "tar_utils.zip" `
      -Url "http://www.davidegrayson.com/hold/tar_utils.zip" `
      -Checksum "ffe82e94813e12c3a911696adbdd34d6307c01d1b9c756e6ce1c0aebb7477199"
    
    "Extracting tar_utils.zip"
    [System.IO.Compression.ZipFile]::ExtractToDirectory("tar_utils.zip", ".")
    
    "Extracting MSYS2"
    bsdtar -xf $msys2_archive
    
    "Initializing MSYS2"
    cd msys64
    $env:MSYSTEM = MSYS
    usr\bin\bash -l -c "true"
    usr\bin\bash -l -c "pacman -S mingw-w64-x86_64-gcc autoconf flex make libtool"
    
    
    

    public by DavidEGrayson  10221  0  3  0

    Original: https://gist.github.com/pdg137/2cb48696ed7ba25370b6

    Original: https://gist.github.com/pdg137/2cb48696ed7ba25370b6: ruby_quiz1.rb
    a = 10
    
    def b(x = 1)
      10
    end
    
    puts a /2/
    5
    
    puts b /2/
    5
    
    puts a / 2/
    5
    
    puts b / 2/
    5
    
    
    
    
    • Public Snippets
    • Channels Snippets