Skip to content

Instantly share code, notes, and snippets.

View gaejabong's full-sized avatar

개자봉 gaejabong

View GitHub Profile
@slava-vishnyakov
slava-vishnyakov / readme.md
Last active May 7, 2024 04:49
How to upload images with TipTap editor
  1. Create a file Image.js from the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that accepts uploadFunc (function to be called with image being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. } in the new Plugin section.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'

/**
 * Matches following attributes in Markdown-typed image: [, alt, src, title]
 *
@andkirby
andkirby / slack.sh
Last active April 4, 2024 17:51
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@nicksantamaria
nicksantamaria / aws-get-elb-cloudfront-ips.sh
Last active November 9, 2021 19:37
Retrieve a list of CIDR ranges for AWS ELBs and CloudFront (relevant to Sydney region).
# Region: Sydney (ap-southeast-2)
# Service: ELBs.
curl -ss https://ip-ranges.amazonaws.com/ip-ranges.json | jq -arM -c '.prefixes[] | select(.region | contains("ap-southeast-2")) | select(.service | contains("AMAZON")) | .ip_prefix' | tee results.txt
# Region: Sydney (ap-southeast-2)
# Service: CloudFront.
curl -ss https://ip-ranges.amazonaws.com/ip-ranges.json | jq -arM -c '.prefixes[] | select(.region | contains("ap-southeast-2")) | select(.service | contains("CLOUDFRONT")) | .ip_prefix' | tee -a results.txt
# Region: Global
# Service: CloudFront.

The Laracasts PHPStorm theme - modified.

This is a slightly modified version of the great Laracasts PHPStorm theme. I've added some styles for Verions Control (add, modified, deleted line...) and fixed some missing things like warnings.

Download

image

Mac: Add to ~/Library/Preferences/WebIde80/colors

@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active February 16, 2023 20:19
Laracasts PHPStorm theme.
@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 00:45
Setting Nginx FastCGI response buffer sizes.
@kijin
kijin / attachment.php
Last active August 24, 2020 02:58
UTF-8 파일 다운로드 함수
<?php
/**
* PHP 파일 다운로드 함수.
* Version 1.3
*
* Copyright (c) 2014 성기진 Kijin Sung
*
* License: MIT License (a.k.a. X11 License)
* http://www.olis.or.kr/ossw/license/license/detail.do?lid=1006