Skip to content

Instantly share code, notes, and snippets.

View remy727's full-sized avatar
🏠
Working from home

Remy Wang remy727

🏠
Working from home
View GitHub Profile
@remy727
remy727 / retrieve-shopify-app-uninstall-surveys.rb
Last active January 5, 2024 19:12
Retrieve Shopify App uninstall surveys
org_id = 'your_org_id'
access_token = 'your_partner_api_access_token'
api_version = 'shopify_api_version' # example: '2024-01'
app_id = "gid://partners/App/your_app_id"
occurred_at_min = 'specific_time' # example: '2024-01-02T23:15:27.000000Z'
uri = URI("https://partners.shopify.com/#{org_id}/api/#{api_version}/graphql.json")
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
@remy727
remy727 / detect-the-client-s-device-using-shopify-app-bridge-utilities.js
Created November 6, 2023 09:35
Detect the client's device using Shopify App Bridge Utilities
import {
isShopifyEmbedded,
isMobile,
isShopifyMobile,
isShopifyPOS
} from '@shopify/app-bridge/utilities';
const onShopifyEmbedded = isShopifyEmbedded();
const onMobile = isMobile();
const onShopifyMobile = isShopifyMobile();
@remy727
remy727 / heroku-alternatives.md
Last active November 28, 2023 15:33
Heroku Alternatives
@remy727
remy727 / rails-timezone-list.json
Last active September 5, 2023 19:26
Rails timezone list JON
[
{
"label": "(UTC-12:00) Etc/GMT+12",
"rails_timezone": "International Date Line West",
"tzinfo_identifier": "Etc/GMT+12"
},
{
"label": "(UTC-11:00) Pacific/Pago_Pago",
"rails_timezone": "American Samoa",
"tzinfo_identifier": "Pacific/Pago_Pago"
@remy727
remy727 / ruby-built-in-exceptions.md
Last active May 3, 2023 12:58
Built-In Exception Classes(Ruby 3.2.1)

Built-In Exception Classes(Ruby 3.2.1)

  • NoMemoryError
  • ScriptError
    • LoadError
    • NotImplementedError
    • SyntaxError
  • SecurityError
  • SignalException
    • Interrupt
  • StandardError
@matsales28
matsales28 / modules_with_arguments.rb
Last active August 25, 2023 19:46
Ruby modules with arguments
class Callable < Module
def self.[](method)
new(method)
end
def initialize(method)
@method = method
end
def included(base)
@wowremywang
wowremywang / enable-redux-dev-tools.js
Last active January 14, 2021 08:25
Enable Redux Dev Tools
import { createStore, applyMiddleware, compose } from "redux";
import rootReducer from "../reducers/index";
import { forbiddenWordsMiddleware } from "../middleware";
const storeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
rootReducer,
storeEnhancers(applyMiddleware(forbiddenWordsMiddleware))
);
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 23, 2024 14:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mlanett
mlanett / rails http status codes
Last active May 23, 2024 11:36
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@rxaviers
rxaviers / gist:7360908
Last active May 23, 2024 20:16
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: