Skip to content

Instantly share code, notes, and snippets.

View gaejabong's full-sized avatar

개자봉 gaejabong

View GitHub Profile
@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
@magnetikonline
magnetikonline / README.md
Last active September 5, 2024 14:55
Setting Nginx FastCGI response buffer sizes.
@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active August 3, 2024 16:45
Laracasts PHPStorm theme.

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

@nicksantamaria
nicksantamaria / aws-get-elb-cloudfront-ips.sh
Last active August 16, 2024 03:39
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.
@andkirby
andkirby / slack.sh
Last active June 5, 2024 09:55
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
@slava-vishnyakov
slava-vishnyakov / readme.md
Last active November 4, 2024 09:03
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]
 *