Skip to content

Instantly share code, notes, and snippets.

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

Daniel odyright

🏠
Working from home
View GitHub Profile
unit WinHttpWS;
interface
uses Windows;
const
// flags for WinHttpOpen
WINHTTP_FLAG_ASYNC = $10000000; // this session is asynchronous (where supported)
WINHTTP_FLAG_SECURE_DEFAULTS = $30000000; // note that this flag also forces async
@sylveon
sylveon / main.cpp
Created November 4, 2021 19:46
Win32 Mica
#include <Unknwn.h>
#include <winrt/Windows.System.h>
#include <winrt/Windows.UI.Composition.Desktop.h>
#include <windows.ui.composition.interop.h>
#include <ShellScalingAPI.h>
#include <DispatcherQueue.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
using namespace winrt;
@jalbam
jalbam / requestAnimationFrame-polyfill.js
Last active February 5, 2024 01:10
window.requestAnimationFrame polyfill (with high resolution timing, very precise)
'use strict';
// requestAnimationFrame polyfill by Erik Möller.
// Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavic, Darius Bacon and Joan Alba Maldonado.
// Adapted from https://gist.github.com/paulirish/1579671 which derived from
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// Added high resolution timing. This window.performance.now() polyfill can be used: https://gist.github.com/jalbam/cc805ac3cfe14004ecdf323159ecf40e
// MIT license
// Gist: https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
@jpbecotte
jpbecotte / Vue-cli-3-Phoenix-1.3-HOWTO.md
Last active August 23, 2020 05:32
Vue-cli 3, Phoenix 1.3, a complete how-to

Introduction

I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:

  • I want to use the new Vue-cli to select the features that I want,
  • I do NOT want to setup Webpack (I know, what a shame!). The new Vue-cli includes the new vue-cli-service, which uses an instance of webpack-dev-server, so you don't have to import it manually in your project.
  • I do not want to use Brunch.

Create your Phoenix App

Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.

@terriblememory
terriblememory / D3D11AppView.cpp
Last active March 19, 2022 09:25
Minimal C++/WinRT D3D11 UWP sample
/**
D3D11AppView.cpp
*/
#include "pch.h"
#include "D3D11AppView.h"
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::ApplicationModel::Activation;
@rniswonger
rniswonger / fluid-text.scss
Last active April 19, 2024 14:39
Sass Mixin: Fluid Text
// fluidly resize type
// based on example here https://css-tricks.com/snippets/css/fluid-typography/
@mixin fluid-type($font-min, $font-max, $screen-min, $screen-max) {
font-size: #{$font-min}px;
@media only screen and (min-width: #{$screen-min}px) {
font-size: calc(
#{$font-min}px + #{($font-max - $font-min)} * (100vw - #{$screen-min}px) / (#{$screen-max} - #{$screen-min})
);
}
@CodeMyUI
CodeMyUI / gsap-banner-ad-2-in-1-300x600.markdown
Created September 6, 2017 08:20
GSAP Banner Ad - 2 in 1 - (300x600)

GSAP Banner Ad - 2 in 1 - (300x600)

This is a mockup from last year, done as POC of an ad with two different paths/ctas.

A Pen by halvves on CodePen.

License.

@CodeMyUI
CodeMyUI / index.html
Created March 21, 2017 04:25
Preloading animation with velocity.js and CSS3 transitions
<!-- Page preloader -->
<div id="hola">
<div id="preloader">
<span></span>
<span></span>
</div>
</div>
<!-- Start content -->
<div class="page-wrap">
@leny
leny / .eslintrc.json
Last active June 21, 2024 06:31
ESLint config file for node.js + ES6 projects.
{
"env": {
"node": true,
"es6": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParameters": true,
@likethesky
likethesky / elixirphoenix.bash
Last active June 7, 2024 17:26
Installing Elixir & the Phoenix framework with Homebrew on OS X
$ brew update && brew doctor # Repeat, until you've done *all* the Dr. has ordered!
$ brew install postgresql # You'll need postgres to do this... you may also need to 'initdb' as well. Google it.
$ brew install elixir
$ mix local.hex # Answer y to any Qs
$ createuser -d postgres # create the default 'postgres' user that Chris McCord seems to like -- I don't create mine w/a pw...
# Use the latest Phoenix from here: http://www.phoenixframework.org/docs/installation -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.0.3/phoenix_new-1.0.3.ez