Skip to content

Instantly share code, notes, and snippets.

View sergeykuzmich's full-sized avatar
🎱
To be or not to be...

Sergey Kuzmich sergeykuzmich

🎱
To be or not to be...
  • Remedy Product, Inc.
  • Planet Earth, The Milky Way Galaxy
  • 14:47 (UTC +02:00)
View GitHub Profile
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active May 4, 2024 14:33
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

#####################################
## Enable Case-Insensitive completion
set completion-ignore-case On
# BEGIN UGLY HACK
# This lets us initialize nvm, node and any other global node binaries on demand (lazily)
# to save on shell startup time
export NVM_DIR="$HOME/.nvm"
declare -a NODE_GLOBALS=(`find $NVM_DIR/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
NODE_GLOBALS+=("node")
NODE_GLOBALS+=("nvm")
# Bootstrap nvm on demand
############
## Setup NVM
. /Users/Sergey/.nvm/lazy-load.sh
##################
## Setup newer PHP
export PATH="/usr/local/php5/bin":"$PATH"
export PATH="$HOME/.composer/vendor/bin":"$PATH"
@sergeykuzmich
sergeykuzmich / Developer.terminal
Last active April 21, 2021 11:24
MacOS Terminal Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlueColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGmCwwXHR4lVSRudWxs1Q0ODxAR
EhMUFRZcTlNDb21wb25lbnRzVU5TUkdCXE5TQ29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29s
b3JTcGFjZVYkY2xhc3NPECgwLjQ5MDc4MDQ3MjggMC42NTExMzg2MDM3IDAuOTk5Njcw
@sergeykuzmich
sergeykuzmich / Preferences.sublime-settings
Last active April 21, 2021 11:25
Sublime Text 3 - User Preferences
{
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"file_exclude_patterns":
[
".DS_Store",
@nodkz
nodkz / apolloServer2019.ts
Last active August 3, 2022 11:17
GraphQL error tracking with sentry.io (ApolloServer 2019)
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import { ApolloServerPlugin } from 'apollo-server-plugin-base';
import * as Sentry from '@sentry/node';
Sentry.init({
environment: process.env.APP_ENV,
// see why we use APP_NAME here: https://github.com/getsentry/sentry-cli/issues/482
release: `${process.env.APP_NAME}-${process.env.APP_REVISION}` || '0.0.1',
dsn: process.env.SENTRY_DSN,
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active December 29, 2023 00:40
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@retgef
retgef / pug-bomb.php
Created June 24, 2012 07:46
Pug Bomb API Endpoint WordPress Plugin
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{