Skip to content

Instantly share code, notes, and snippets.

@aosmichenko
aosmichenko / iterm2-solarized.md
Created September 5, 2022 14:44 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@aosmichenko
aosmichenko / ICS.php
Created October 6, 2021 18:42 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@aosmichenko
aosmichenko / wp_insert_attachment_from_url.php
Last active November 4, 2020 21:40 — forked from m1r0/wp_insert_attachment_from_url.php
WP: Insert attachment from URL
<?php
/**
* Insert an attachment from an URL address.
*
* @param String $url
* @param Int $parent_post_id
* @return Int Attachment ID
*/
function crb_insert_attachment_from_url($url, $parent_post_id = null) {
@aosmichenko
aosmichenko / script.js
Created September 18, 2019 11:58
Fluid Simulation Canvas
'use strict';
const canvas = document.getElementsByTagName('canvas')[0];
canvas.width = canvas.clientWidth;
canvas.height = canvas.clientHeight;
let config = {
SIM_RESOLUTION: 128,
DYE_RESOLUTION: 512,
DENSITY_DISSIPATION: 0.97,
'use strict';
/**************** gulpfile.js configuration ****************/
const
// directory locations
dir = {
nm: '../../../node_modules/',
theme: '.',
@aosmichenko
aosmichenko / Vanilla JS equivalents of jQuery methods.md
Created September 19, 2017 10:14 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@aosmichenko
aosmichenko / home.php
Created July 31, 2016 09:47 — forked from itzikbenh/home.php
Very simple infinite scroll in WordPress
//Just a random file for loading your posts to see that the infinite scroll works.
<?php get_header(); ?>
<div class="col-md-6 col-md-offset-3">
<div class="post-container">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="page-header post">
<h1><?php the_title(); ?></h1>
<p><?php the_excerpt(); ?></p>
</div>
@aosmichenko
aosmichenko / states-drop-array.php
Created April 13, 2016 15:18 — forked from norcross/states-drop-array.php
dropdown array of states in PHP
<?php
/**
* set up dropdown for states
*
* @return states
*/
static function states_select( $name = 'niica_member_state', $user_id = 0 ) {
// fetch the current status

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@aosmichenko
aosmichenko / countries.php
Created December 25, 2015 12:59 — forked from danielpataki/countries.php
Country Array
$countries = array("Afghanistan" => "Afghanistan", "Albania" => "Albania", "Algeria" => "Algeria", "American Samoa" => "American Samoa", "Andorra" => "Andorra", "Angola" => "Angola", "Anguilla" => "Anguilla", "Antarctica" => "Antarctica", "Antigua and Barbuda" => "Antigua and Barbuda", "Argentina" => "Argentina", "Armenia" => "Armenia", "Aruba" => "Aruba", "Australia" => "Australia", "Austria" => "Austria", "Azerbaijan" => "Azerbaijan", "Bahamas" => "Bahamas", "Bahrain" => "Bahrain", "Bangladesh" => "Bangladesh", "Barbados" => "Barbados", "Belarus" => "Belarus", "Belgium" => "Belgium", "Belize" => "Belize", "Benin" => "Benin", "Bermuda" => "Bermuda", "Bhutan" => "Bhutan", "Bolivia" => "Bolivia", "Bosnia and Herzegowina" => "Bosnia and Herzegowina", "Botswana" => "Botswana", "Bouvet Island" => "Bouvet Island", "Brazil" => "Brazil", "British Indian Ocean Territory" => "British Indian Ocean Territory", "Brunei Darussalam" => "Brunei Darussalam", "Bulgaria" => "Bulgaria", "Burkina Faso" => "Burkina Faso", "Burund