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
FROM dmp1ce/php-fpm-drupal:5 | |
RUN apt-get -yq update | |
RUN apt-get -yq install --no-install-recommends rsync |
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
#!/bin/sh | |
# https://www.gamingonlinux.com/articles/i-have-finally-found-a-way-to-sort-out-screen-tearing-on-nvidia-with-linux.7213/page=7#comments | |
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/.*:://'|sed 's/^ *//;s/ *$//')\"" |
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
#!/bin/sh | |
# https://www.gamingonlinux.com/articles/i-have-finally-found-a-way-to-sort-out-screen-tearing-on-nvidia-with-linux.7213/page=7#comments | |
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/ViewPortIn=/ForceFullCompositionPipeline=On, ViewPortIn=/g'|sed 's/.*:://'|sed 's/^ *//;s/ *$//')\"" |
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
FROM haskell | |
MAINTAINER /u/dmp1ce | |
# Install requirements for katy_playlist.hs | |
RUN cabal update && cabal install hoauth2 |
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
#!/usr/bin/env runhaskell | |
-- Coder Radio Challenge for Episode #214 | |
-- https://www.reddit.com/r/CoderRadio/comments/4t7oyt/episode_214_coding_challenge/ | |
-- To run make this file executable and run ./blackjask.hs | |
-- runhaskell and ghci are required | |
-- This program considers a players hand which can be more one or more cards | |
-- containing one ore more Aces. |
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
-- | A library to do stuff. | |
module Lib | |
( | |
ourAdd | |
, fun1 | |
, fun1' | |
, fun2 | |
, fun2' | |
) where |
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 LibSpec where | |
import Test.Hspec | |
import Test.Hspec.QuickCheck | |
import Lib (ourAdd,fun1,fun2,fun1',fun2') | |
main :: IO () | |
main = hspec spec |
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
--skipAt :: Int -> [a] -> [[a]] | |
--skipAt n (x:xs) | |
-- | length xs > n = [[x]] ++ (skipAt n xs) | |
-- | length xs <= n = [[x]] | |
-- | n < 0 = [(x:xs)] | |
-- | otherwise = skipAt (n-1) xs | |
-- Working solution | |
skipAt :: Int -> [a] -> [[a]] | |
skipAt n ls |
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
#!/bin/bash | |
# To run from shell: | |
# bash <(curl -sSL https://gist.githubusercontent.com/dmp1ce/84c31085745101f8c241/raw) | |
do_config() { | |
# Make sure to run as root | |
user="$(id -un 2>/dev/null || true)" | |
if [ "$user" != 'root' ]; then |
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
$ (git clone https://github.com/dmp1ce/decompose) 2>&1 >/dev/null | |
Cloning into 'decompose'... | |
remote: Counting objects: 190, done. | |
remote: Total 190 (delta 0), reused 0 (delta 0), pack-reused 190 | |
Receiving objects: 100% (190/190), 31.33 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (96/96), done. | |
Checking connectivity... done. |