Skip to content

Instantly share code, notes, and snippets.

View emohamed's full-sized avatar

Emil Mohamed emohamed

View GitHub Profile
@emohamed
emohamed / check.js
Last active February 13, 2022 15:10 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
const legit = require('legit');
const fs = require('fs');
const async = require('async');
let jsonString = fs.readFileSync('./email-providers.json');
let domains = JSON.parse(jsonString);
const valid = [];
const invalid = [];

Keybase proof

I hereby claim:

  • I am emohamed on github.
  • I am emohamed (https://keybase.io/emohamed) on keybase.
  • I have a public key ASCik9WisuO7Z5ylm0swkpFAiaVDVyapVK8_FDYHPiYQqwo

To claim this, I am signing this object:

(function($, undefined){
// vars
var blocks = {};
var onChangeTimeout = 0;
var isSerializing = false;
// WP vars
var el = wp.element.createElement,
Fragment = wp.element.Fragment,
<?php
Container::make( 'block', 'Flight Details' )
->add_fields( [
Field::make( 'text', 'crb_from', 'From' ),
Field::make( 'text', 'crb_to', 'To' ),
Field::make( 'date_time', 'crb_departure_time', 'Departure Time' ),
Field::make( 'date_time', 'crb_arrival_time', 'Arrival Time' ),
Field::make( 'text', 'crb_duration', 'Duration' ),
])
->set_block_render_function(function ($flight) {
### Keybase proof
I hereby claim:
* I am emohamed on github.
* I am emohamed (https://keybase.io/emohamed) on keybase.
* I have a public key ASDJJT9RHt6htVTvMKe4J7kICygH4_4HKGpCCCAcWcLcRAo
To claim this, I am signing this object:
@emohamed
emohamed / gist:d452fca0d1da36e5eef64e6bf73ea95e
Last active November 9, 2016 12:32
Sublime Text 2 - Useful Shortcuts

Sublime Text – Shortcuts

Navigation

Combine those with shift for selecting text simultaneously

Ctrl+→ / Ctrl+← Go to the end / start of the word
End / Home Go to the end / beginning of the line
Ctrl+End / Ctrl+Home Go to the end / beginning of the file
Alt+→ / Alt+← Go to the end / beginning of the sub-word
<?php
use Carbon_Fields\Container\Container;
use Carbon_Fields\Field\Field;
$general_block = [
Field::make('text', 'plain_text_block'),
Field::make('rich_text', 'rich_text_block'),
];
$media_block = [
@emohamed
emohamed / 0_reuse_code.js
Created November 18, 2015 13:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
Carbon_Field::register_namespace('location', function ($type, $name, $label) {
return Carbon_Field::factory($type, $name, $label)
->set_conditional_logic(array(
'relation' => 'AND',
array(
'field' => 'crb_user_location_type',
'value' => 'fixed',
'compare' => '=',
Carbon Fields use Underscore template engine. Each field has a `template` method that prints the underscore template code.
```
class Carbon_Field_Example extends Carbon_Field {
// Base template
function template() {
?>
<input id="{{{ id }}}" type="text" name="{{{ name }}}" value="{{ value }}" class="regular-text example-field" />
<span>This is an example field. </span>
<?php