この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。
- 古典的なサーバーサイド WAF への +α の味付け
- 大規模なクライアントアプリケーション管理のための SPA
- SEO / SSR を考慮した Node ヘヴィーな環境
他、提唱されてるパターン
<?php | |
/* | |
MIT License | |
Copyright (c) 2021 HAYASHI-Masayuki | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
var request = require('request'); | |
var fs = require('fs'); | |
var url = "https://slack.com/api/emoji.list?pretty=1"; | |
var token = "Bearer <token here>"; | |
request.get({ | |
url : url, | |
headers : { | |
"Authorization" : token | |
} |
<!-- bold-cart-item.liquid --> | |
{% comment %} Last updated 2018-May-14 {% endcomment %} | |
{% capture bold_cart_item_liquid %} | |
{% comment %} | |
BOLD-CART-ITEM.LIQUID - Universal Bold Cart Updater | |
This file creates liquid variables to assist in updating line items in cart.liquid. | |
USED BY: Product Options, Recurring Orders, Product Builder | |
REQUIRES: bold.css |
{% for product in collection.products %} | |
<a href="{{ product.url | within: collection }}"> | |
{% assign image = product.featured_image %} | |
<img src="{{ image.src | img_url: '480x' }}" alt="{{ image.alt | escape }}" | |
srcset=" | |
{% if image.width > 640 %}{{ image.src | img_url: '640x' }} 640w{% endif %} | |
{% if image.width > 720 %},{{ image.src | img_url: '720x' }} 720w{% endif %} | |
{% if image.width > 900 %},{{ image.src | img_url: '900x' }} 900w{% endif %} | |
" | |
sizes="(min-width: 960px) 450px, (min-width: 720px) 50vw, 100vw" |
# -*- coding: utf-8 -*- | |
# TensowFlowのインポート | |
import tensorflow as tf | |
# MNISTを読み込むためinput_data.pyを同じディレクトリに置きインポートする | |
# input_data.pyはチュートリアル内にリンクがあるのでそこから取得する | |
# https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/examples/tutorials/mnist/input_data.py | |
import input_data | |
import time |
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset name="Laravel and similar phpmd ruleset" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description> | |
Inspired by https://github.com/phpmd/phpmd/issues/137 | |
using http://phpmd.org/documentation/creating-a-ruleset.html | |
</description> |
<?php | |
$blob = getResizedImageBlob("./sample.png", 100, 200); | |
file_put_contents("sample_100x200.png", $blob); | |
/** | |
* @param string $img_path 画像ファイルパス | |
* @param string int $w_re リサイズ後の幅 | |
* @param string int $h_re リサイズ後の高さ | |
* @return string |
#!/bin/sh | |
# | |
# Import all SSH keys from LP | |
# | |
PREFIX=~ | |
SSH_ASKPASS=$PREFIX/bin/lp-askpass.sh | |
export SSH_ASKPASS | |
# This is needed to force ssh-add to honor our SSH_ASKPASS. | |
DISPLAY=foo | |
export DISPLAY |