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
stages: | |
- Lint images | |
- Build and publish images | |
## Load a node.js image, install dockerlint and lint all Dockerfiles | |
linting: | |
stage: Lint images | |
image: node:4-alpine | |
script: | |
- npm install -g dockerlint && npm cache clean |
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 MainActivity : FlutterActivity() { | |
private val SHARE_CHANNEL = "jademind.com/share" | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
GeneratedPluginRegistrant.registerWith(this) | |
MethodChannel(flutterView, SHARE_CHANNEL).setMethodCallHandler { call, result -> | |
if (call.method.equals("share-file")) { | |
val argsMap = call.arguments as HashMap<String, String> |
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
@objc class AppDelegate: FlutterAppDelegate { | |
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
// Receive the share method channel | |
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController | |
let shareChannel = FlutterMethodChannel(name: "jademind.com/share", binaryMessenger: controller.binaryMessenger) | |
// Register a callback handler | |
shareChannel.setMethodCallHandler({ | |
(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in |
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
func shareFile(arguments:Any?) -> Void { | |
let argsMap = arguments as! NSDictionary | |
let subject = argsMap.value(forKey: "subject") as? String | |
let filepath = argsMap.value(forKey: "filepath") as? String | |
let x = argsMap.value(forKey: "x") as? NSNumber | |
let y = argsMap.value(forKey: "y") as? NSNumber | |
let width = argsMap.value(forKey: "width") as? NSNumber | |
let height = argsMap.value(forKey: "height") as? NSNumber | |
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
# frozen_string_literal: true | |
require 'digest' | |
# The command pattern to use. Note that placeholders like :path | |
# :task and :output will be replaced by whenever. | |
RAKE_COMMAND = 'cd :path && bundle exec rails :task --silent :output' | |
# Helper method for uniq file locks | |
def wrap_with_lock(prefix, command) |
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
const hubspot = require('@hubspot/api-client'); | |
exports.main = async (event, callback) => { | |
// initialize the hubspot api client with your api secret | |
const hubspotClient = new hubspot.Client({ | |
apiKey: process.env.API_KEY | |
}); | |
// the ID of the email template | |
const EMAIL_TEMPLATE_ID = 82546305923; |
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
# Install Python | |
brew install python@3.9 | |
# Install NVM | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
# Update/check your source files (.zshrc, .bashrc, etc.) | |
export PATH="~/.nvm/current/bin:$PATH" | |
# Install specific Node version |
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 CurrencyInput < SimpleForm::Inputs::StringInput | |
def input(wrapper_options) | |
input_options = input_html_options.merge({data: {autonumeric: true}}) | |
merged_input_options = merge_wrapper_options(input_options, wrapper_options) | |
template.content_tag(:div, class: 'input-group') do | |
template.concat span_currency_sign | |
template.concat @builder.text_field(attribute_name, merged_input_options) | |
end | |
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
#!/usr/bin/python | |
import argparse | |
import json | |
import os | |
import sys | |
from typing import List, Optional | |
from urllib.request import urlopen | |
"""Downloads all files of messages of your Slack (workspace) JSON export. Each channel |
OlderNewer