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
@echo off
echo ==========================================================================
echo = Tom Clancy's The Division 2 Cleaner =
echo = Division 2 ver. 3260693 =
echo = Ref https://gist.github.com/naa0yama/227888f9064e617a02f0205c4a87b2a5 =
echo ==========================================================================
set Division2_DIR=%USERPROFILE%\Documents\My Games\Tom Clancy's The Division 2\
echo Division2 Directory %Division2_DIR%
cd /d %Division2_DIR%
@odyright
odyright / D3D11AppView.cpp
Created March 19, 2022 09:25 — forked from terriblememory/D3D11AppView.cpp
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;
@odyright
odyright / main.cpp
Created January 17, 2022 11:11 — forked from sylveon/main.cpp
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;
@odyright
odyright / 10 BEST SASS MIXINS
Created October 8, 2019 11:02
CSS - Practice
/* css prefix */
/*
div {
@include css3-prefix(transform, scale3d(2.5, 2, 1.5));
}
*/
@mixin css3-prefix($prop, $value) {
-webkit-#{$prop}: #{$value};
-moz-#{$prop}: #{$value};
-ms-#{$prop}: #{$value};
@odyright
odyright / example.scss
Created October 8, 2019 10:14
Compiles whole font-family @font-face rules. Uses a mixin and (preferably) separate file for each font-family and compiles css with @font-face rules for each weight/style. example.scss shows a font-family file, the other is the actual mixin.
// example font-face file
/* -----------------------------------------
Geometrica Font
------------------------------------------*/
// Source:
// -------
// DesignCuts: Exceptional Best-Selling Fonts Complete
// Latinotype
@odyright
odyright / mysql.database.yml
Created August 6, 2018 19:48 — forked from jwo/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
@odyright
odyright / Vue-cli-3-Phoenix-1.3-HOWTO.md
Created March 20, 2018 10:45 — forked from jpbecotte/Vue-cli-3-Phoenix-1.3-HOWTO.md
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.

@odyright
odyright / Phoenix JWT.md
Created February 21, 2018 16:24 — forked from nikneroz/Phoenix JWT.md
Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

User model bootstrap

Let's generate User model and controller.

mix ecto.create
mix phoenix.gen.json Accounts User users email:string password_hash:string
Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
Keys are generic ones. These are the same from MSDN account.
Product Key : -6Q8QF
Validity : Valid
Product ID : 00369-90000-00000-AA703
Advanced ID : XXXXX-03699-000-000000-00-1032-9200.0000-0672017