Skip to content

Instantly share code, notes, and snippets.

View XEngine's full-sized avatar
🍊

Cem Yılmaz XEngine

🍊
View GitHub Profile
[
{
"title": "Amiga",
"items": [
"Chuckie Egg",
"Manic Miner",
"Jet Set Willy",
"Dizzy: The Ultimate Cartoon Adventure",
"Boulder Dash",
"Renegade",
@XEngine
XEngine / scratch.js
Created June 22, 2019 07:34
simpleParallax
import debounce from 'lodash/throttle'
export default class Parallax {
constructor() {
this.parallaxElements = document.querySelector('.parallax-content')
this.last_known_scroll_position = 0;
this.ticking = false;
this.observe = this.observe.bind(this)
this.init()
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Shared.Services;
public static class RazorProviderExtensions
{
public static string RenderRazorViewToString(this Controller controller, string viewName, object model = null)
{
controller.ViewData.Model = model;
using (var sw = new StringWriter())
{
var viewResult = ViewEngines.Engines.FindPartialView(controller.ControllerContext, viewName);
var viewContext = new ViewContext(controller.ControllerContext, viewResult.View,
controller.ViewData, controller.TempData, sw);
variables:
EXE_RELEASE_FOLDER: ''
DEPLOY_FOLDER: 'C:\htdocs\www.test.de'
NUGET_PATH: 'C:\Runner\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
.backup: &backup |
$path = "$target"
$destination = "$target-$datetime.zip"
$exclude = @("marketing","marketing-test","")
.backup: &backup |
& robocopy "$target" "$target-$datetime" /MIR
.publish: &publish |
$array = @("assets", "Views", "bin", "config")
foreach ($element in $array) {
robocopy "./publish/$element" "$target/$element" /E /MIR /IS /IT
}
variables:
{
"presets": [
["@babel/preset-env", { "useBuiltIns": "usage", "corejs": 3 }]
],
"plugins": [
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import"
]
}
{
"private": true,
"browserslist": [
"> 1%",
"not dead"
],
"scripts": {
"dev": "npm run watch",
"watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules",
"build": "npm run production",
require('dotenv').config()
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin')
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries");
const path = require('path');
const path = require('path')
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const WebpackAssetsManifest = require('webpack-assets-manifest');
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const CleanWebpackPlugin = require('clean-webpack-plugin')
const CleanObsoleteChunks = require('webpack-clean-obsolete-chunks');
const devMode = process.env.NODE_ENV !== 'production'
let webpackConfig = {