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
########################################## | |
# To run: | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
########################################## | |
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
fi |
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
using System; | |
namespace VMSandbox | |
{ | |
class AModel | |
{ | |
public DateTime Date { get; set; } = DateTime.UtcNow; | |
public int MyLifeForTheCodeDownloads { get; set; } = Int32.MaxValue; | |
} |
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
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 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
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
apt-get -y install make | |
apt-get -y install libncurses5-dev | |
mkdir -p /src/erlang | |
cd /src/erlang | |
wget http://www.erlang.org/download/otp_src_17.0.tar.gz | |
tar -xvzf otp_src_17.0.tar.gz | |
chmod -R 777 otp_src_17.0 | |
cd otp_src_17.0 | |
./configure |
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
def public_setters | |
public_methods.select { |m| m =~ /=$/ } | |
.reject { |m| %i(== === !=).include? m } | |
end |
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
start = Date.today | |
stop = Date.today + 7 | |
(start..stop).each { |x| puts x } |
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
%h2 Registrations | |
.row{:"ng-controller" => "RegistrationsCtrl"} | |
.span6 | |
%ul.players | |
%li{:"ng-repeat" => "person in registrations"} | |
{{person.name}} | |
.span6 | |
.player-info |
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
using System; | |
using System.Configuration; | |
using Castle.Components.DictionaryAdapter; | |
using Castle.MicroKernel.Registration; | |
using Castle.Windsor; | |
using Rhino.Mocks; | |
namespace CastleDictionaryAdapterExample | |
{ | |
class Program |
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
class Array | |
def to_range | |
highs = self.select { |x| self.include?(x+1) == false }.sort_by { |x| x } | |
lows = self.select { |x| self.include?(x-1) == false }.sort_by { |x| x } | |
(0...lows.count).map { |i| lows[i]..highs[i] } | |
end | |
end |
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
class DataType | |
[:STRING, :DATE, :UNKNOWN, :NUMERIC].each do |type| | |
self.instance_eval "def self.#{type};:#{type};end" | |
end | |
end |
NewerOlder