- TypeScript 1.5 http://www.typescriptlang.org/
- WebPack http://webpack.github.io/
- awesome-typescript-loader https://github.com/s-panferov/awesome-typescript-loader
- DefinitelyTyped http://definitelytyped.org/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOOGLE_OAUTH_CLIENT_ID= | |
GOOGLE_OAUTH_CLIENT_SECRET= | |
NEXTAUTH_SECRET= | |
# Use 127.0.0.1 instead of localhost to avoid issues with NextAuth.js | |
NEXTAUTH_URL=http://127.0.0.1:3000 | |
STRAPI_BACKEND_URL=http://127.0.0.1:1337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
with(new Page())->makeRoot(); | |
with(new Page())->makePreviousSiblingOf(Page::find(1)) | |
with(new Page())->makeNextSiblingOf(Page::find(1)) | |
with(new Page())->makeLastChildOf(Page::find(5)) | |
with(new Page())->makeFirstChildOf(Page::find(2)) | |
Page::find(2)->children() | |
Page::find(2)->parent() | |
Page::find(2)->sibling() | |
Page::find(2)->isDescendant(Page::find(3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Использование: | |
* $v = new VideoThumb($link); | |
* $v->getVideo(); //Ссылка на видео | |
* $v->getTitle(); //Название ролика | |
* $v->fetchImage($path) //Скачать самое большое превью ролика | |
* | |
* Прогнать тест: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('App.controller.SpikeController', { | |
extend: 'Ext.app.Controller', | |
refs: [ | |
{ ref: 'foobar', selector: '#foobar' }, | |
{ ref: 'bazbux', selector: '#bazbux' }, | |
{ ref: 'spikeView', selector: 'spike_view' } | |
], | |
init: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> | |
* @copyright Copyright 2012 Sean Murphy. All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Setup java | |
if [ `uname -m` == 'x86_64' ]; then | |
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/" | |
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/" | |
else | |
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/" | |
JAVA_HOME="/usr/lib/jvm/java-7-oracle/" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RGBAtoRGB(r, g, b, a, r2,g2,b2){ | |
var r3 = Math.round(((1 - a) * r2) + (a * r)) | |
var g3 = Math.round(((1 - a) * g2) + (a * g)) | |
var b3 = Math.round(((1 - a) * b2) + (a * b)) | |
return "rgb("+r3+","+g3+","+b3+")"; | |
} | |
$("#result").html(RGBAtoRGB(225,110,0,0.5,255,255,255)); | |
|
NewerOlder