Skip to content

Instantly share code, notes, and snippets.

View koslib's full-sized avatar

Konstantinos Livieratos koslib

View GitHub Profile
@koslib
koslib / outbound-email-with-cloudflare.md
Created April 25, 2024 15:00 — forked from irazasyed/outbound-email-with-cloudflare.md
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

@koslib
koslib / app.js
Created August 13, 2017 13:15
React.js Github Cards demo
const Card = (props) => {
return (
<div>
<img width="75"
src={props.avatar_url} />
<div style={{display: 'inline-block', marginLeft: '10'}}>
<div style={{fontSize: '1.25em', fontWeight: 'bold'}}>{props.name}</div>
<div>{props.company}</div>
</div>
</div>
@koslib
koslib / app.js
Created August 13, 2017 11:55
React.js Simple Components demo
class Button extends React.Component {
handleClick = () => {
this.props.onClickFunction(this.props.incrementValue)
}
render() {
return (
<button onClick={this.handleClick}>
@koslib
koslib / geo.py
Created February 24, 2017 15:59
Check if specific geo point lies inside a MultiPolynomial area (Django & GeoDjango)
from django.contrib.gis.geos import GEOSGeometry
p = GEOSGeometry("Point(-3.735295 21.624602)", srid=4326) # 4326 for standard lng/lat coordinates
# Transform to same coordinate system as maps
p.transform(27700)
RegionBorder.objects.filter(mpoly__contains=p)
[<RegionBorder: Athens>]
2015-02-16 15:52:30.155 go4more[922:340232] -[WLPushManager didRegisterForRemoteNotificationsWithDeviceToken:](193): DEVICE TOKEN: <3c397358 99cc16bd 405ca4d3 cf5873ea c3a9621a 8908e6a9 5dcd8ab3 6a730433>
2015-02-16 15:52:30.226 go4more[922:340232] -[WLEventSimple gatherIndividualData:](164): WLEvent Context: {
"device_info" = {
"carrier_name" = COSMOTE;
development = true;
"device_family" = iPhone;
"device_token" = 3c39735899cc16bd405ca4d3cf5873eac3a9621a8908e6a95dcd8ab36a730433;
"ios_aps_entitlement_valid" = 1;
"ios_device_model" = "iPhone5,3";
"ios_is_jailbroken_phone" = 0;
@koslib
koslib / commands
Created October 24, 2014 08:11
PostgreSQL fix for OS X Yosemite
# Uninstall old postgresql installation from your system and then install via homebrew the new one
brew unlink postgresql
brew install postgresql
# Create postgresql missing directories
mkdir /usr/local/var/postgres/pg_tblspc
mkdir /usr/local/var/postgres/pg_twophase
mkdir /usr/local/var/postgres/pg_stat_tmp