Skip to content

Instantly share code, notes, and snippets.

View steelydylan's full-sized avatar
🎯
Focusing

Hori Godai steelydylan

🎯
Focusing
View GitHub Profile
@atsu666
atsu666 / FBDebugger.php
Last active September 20, 2016 02:38
a-blog cms : facebook debugger
<?php
/**
* php/ACMS/User/POST/FBDebugger.php
*
* テンプレート上では、標準のPOSTモジュールと同様に、
* <input type="submit" name="ACMS_POST_FBDebugger" value="Clear FB Cache"> で呼び出されます。
*/
class ACMS_User_POST_FBDebugger extends ACMS_POST
{
protected $endpoint = "https://graph.facebook.com/?scrape=true&id=%s";
@masakielastic
masakielastic / bacon.js_README.md
Last active May 2, 2018 05:07
bacon.js の README の翻訳 (原文は2013年7月1日時点のものを取得)。最新の内容は https://github.com/raimohanska/bacon.js を参照。ライセンスは原文と同じです。

Bacon.js

JavaScript のための小さな FRP (Functional Reactive Programming) ライブラリです。

手続き型から関数型に切り替えることで、イベントスパゲッティのコードがクリーンで宣言スタイルの「風水の bacon」(feng shui bacon)に変わります。入れ子のループを mapfilter のような関数型プログラミングのコンセプトに置き換えることに似ています。個別のイベントに取り組むことを止め、イベントストリームを扱います。mapfilter でデータを変換します。mergecombine でデータを combine します。重火器に切り替え、上司のように flatMapcombineTemplate を掌握します。

このライブラリはイベントのアンダースコア( _ )です。残念なことに ~ の記号は JavaScript では認められていないからです。

資料です。

@steelydylan
steelydylan / Hook.php
Created May 15, 2019 01:22
ブログレベルを表示するグローバル変数の生成サンプル
<?php
namespace Acms\Custom;
use DB;
use SQL;
use ACMS_Filter;
/**
* ユーザー定義のHookを設定します。
*/
@phpbits
phpbits / full-codes.js
Last active July 1, 2022 11:32
Extend core Gutenberg blocks with custom attributes and settings. View full tutorials here : https://jeffreycarandang.com/extending-gutenberg-core-blocks-with-custom-attributes-and-controls/
/**
* External Dependencies
*/
import classnames from 'classnames';
/**
* WordPress Dependencies
*/
const { __ } = wp.i18n;
const { addFilter } = wp.hooks;
@tyxla
tyxla / insert-widget-in-sidebar.php
Created August 24, 2016 10:43
Insert a widget in a sidebar programmatically in WordPress
<?php
/**
* Insert a widget in a sidebar.
*
* @param string $widget_id ID of the widget (search, recent-posts, etc.)
* @param array $widget_data Widget settings.
* @param string $sidebar ID of the sidebar.
*/
function insert_widget_in_sidebar( $widget_id, $widget_data, $sidebar ) {
@justin-carver
justin-carver / training.jsonl
Created October 22, 2022 10:40
GPT-3 Fine-Tuning SaaS Name Training Data
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Pukket, Description: Social Media Management App focused on Local SMBs.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Stock AI, Description: Get Stock Images Generated by AI + In-built blogpost image generator.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Rewardful, Description: Build Your own affiliate program to scale your business.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: PageFlow, Description: Storytelling Tool to generate content in English & German.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Arcade Software, Description: To create Interactive Product Demos for Landing Pages.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Lanva.io, Description: Turn Your Long form
@mizchi
mizchi / predict-frontend.md
Last active May 12, 2023 03:43
React のユーザーから見た今後のフロントエンドの予想

この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。

今のフロントエンドの分類

  • 古典的なサーバーサイド WAF への +α の味付け
  • 大規模なクライアントアプリケーション管理のための SPA
  • SEO / SSR を考慮した Node ヘヴィーな環境

他、提唱されてるパターン

import ts, { factory } from "typescript";
export function transformerFactory(context: ts.TransformationContext) {
function visitNode(node: ts.Node): ts.Node {
const newNode = ts.visitEachChild(node, visitNode, context);
if (
ts.isJsxOpeningElement(newNode) ||
ts.isJsxSelfClosingElement(newNode)
) {
return appendSourceMapAttribute(newNode.getSourceFile(), newNode);
@thorsten
thorsten / setUserAgent.js
Created May 9, 2016 15:12
Override user agent on all browsers
function setUserAgent(window, userAgent) {
// Works on Firefox, Chrome, Opera and IE9+
if (navigator.__defineGetter__) {
navigator.__defineGetter__('userAgent', function () {
return userAgent;
});
} else if (Object.defineProperty) {
Object.defineProperty(navigator, 'userAgent', {
get: function () {
return userAgent;
@stefansundin
stefansundin / git-bundle-hook.md
Last active February 1, 2024 06:42 — forked from 8bitDesigner/1.md
Git post-checkout and post-merge hooks to simplify bundling and other tasks.

Make bundleing and npm installing easy

These git hooks runs bundle or npm install automatically whenever you:

  • git checkout a new branch with a different Gemfile or package.json.
  • git pull a change to Gemfile or package.json.

How to install

  1. cd awesome_git_repo