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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace ConnectedCellGrid | |
{ | |
class Program | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
// sample input | |
// 10 | |
// 203 204 205 206 207 208 203 204 205 206 | |
// 13 |
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
$services = Get-Service -DisplayName Apache* | |
foreach ($i in $services) | |
{ | |
Start-Service $i.ServiceName | |
} |
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
# download heroku | |
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh | |
# login to heroku | |
heroku login | |
# create heroku-git link (adding a heroku remote) | |
heroku create | |
# pushing a commit to heroku |
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
sudo apt-get install python-pip python-dev build-essential | |
sudo pip install --upgrade pip |
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
# download sd-agent v1.4.1, then run .sh | |
wget https://raw.githubusercontent.com/serverdensity/sd-agent/master/install.sh | |
chmod +x install.sh | |
./install.sh -a xxxxxxx -k xxxxxxxxxxxxxxxxxxxxxxxxxxx | |
# python and pip need to be installed | |
pip install redis | |
# edit sd-agent config file | |
vi /etc/sd-agent/config.cfg |
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 Rendering | |
class MessageRenderer | |
class SlackMessage; end | |
class SlackAttachment; end | |
class SlackAttachmentField; end | |
class SlackAttachmentAction; end | |
def initialize(context = Context.new) | |
end |
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
class PartRenderer < Renderer | |
PART_MAPPING = { | |
"note" => ::Services::Slack::Rendering::Parts::Note, | |
.... | |
.... | |
.... | |
} | |
def render(context) | |
PART_MAPPING[part_type].new(context).render |
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 Rendering | |
module Parts | |
class Note < Reply | |
include ::Services::Slack::Rendering::Mixins::TeammateAuthor | |
def attachment_color | |
ATTACHMENT_COLOR | |
end | |
def fallback |
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
{ | |
"attachments": [ | |
{ | |
"color": "#36a64f", | |
"pretext": "Some pretext", | |
"author_name": "Jasmine Jaume", | |
"text": "Some text", | |
"image_url": "http://example-website.com/image.jpg" | |
} | |
] |
OlderNewer