This file contains hidden or 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
#!/bin/bash | |
# Credits: https://pastebin.com/NJxfe8Ex | |
PROTON_VERSION="5.0" | |
PROTON_DIR=$HOME/.steam/steam/steamapps/common/Proton\ $PROTON_VERSION | |
RUNNING="$1" | |
if [ ! -f "$PROTON_DIR/proton" ] ; then | |
echo "Proton version $PROTON_VERSION not found!"; |
This file contains hidden or 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
# version: 1.0.1 | |
# latest source: https://gist.github.com/bitinn/22f6fefe026d8d9e83468864edb8f835 | |
import bpy | |
import os | |
def kmi_props_setattr(kmi_props, attr, value): | |
try: | |
setattr(kmi_props, attr, value) |
This file contains hidden or 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
<template> | |
<object type="image/svg+xml" id="svgId" | |
data="e-3.svg" height="50" width="50" viewBox="0 0 50 50" | |
mouseover.delegate="domouseover()" mouseout.delegate="domouseout()" | |
click.delegate="doClickSVG()"> | |
</object> | |
<div> | |
<img src="e-3.svg" click.delegate="doClickSVG()"/> |
This file contains hidden or 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
var gulp = require('gulp'), | |
babel = require('gulp-babel'), | |
livereload = require('gulp-livereload'), | |
http = require('http'), | |
st = require('st'), | |
transform = require('vinyl-transform'), | |
browserify = require('browserify'); | |
gulp.task('js', ["es6"],function() { |
This file contains hidden or 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
<div class="container" ng-app="app"> | |
<div ng-controller="MyCtrl as vm"> | |
<svg width="400" viewbox="-300 -300 600 600"> | |
<g id="circle" style="transform: rotate({{vm.circleRotate}}deg)" ng-class="{ dragging: vm.dragStart }"> | |
<circle fill="#F1F1F1" cy="0" cx="0" ng-attr-r="{{ ::vm.circleRadius }}"></circle> | |
<g ng-repeat="icon in vm.icons" class="icon" ng-attr-transform="{{ 'rotate(-' + vm.iconRotate * $index + ') translate(0, ' + (vm.circleRadius - vm.iconSize) + ')' }}"> | |
<rect ng-attr-width="{{ ::vm.iconSize }}" | |
ng-attr-height="{{ ::vm.iconSize }}" | |
ng-attr-fill="{{ icon.color }}" | |
ng-attr-x="{{ ::-(vm.iconSize/2) }}" |
This file contains hidden or 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
DS_Store | |
*.swp | |
*.app | |
*.log |
This file contains hidden or 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
#!/bin/bash | |
# Open current directory in forklift | |
# Adapted from https://gist.github.com/elentok/6218781 | |
# Adapted from comment https://gist.github.com/elentok/6218781#comment-891115 | |
# Added optional path argument and removed using the clipboard buffer. | |
set -e | |
if [ -z "$@" ]; then |
This file contains hidden or 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
namespace System.Web.Mvc { | |
public class JsonModelBinder : IModelBinder { | |
private readonly static System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); | |
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { | |
var stringified = controllerContext.HttpContext.Request[bindingContext.ModelName]; | |
if (string.IsNullOrEmpty(stringified)) | |
return null; | |
return serializer.Deserialize(stringified, bindingContext.ModelType); | |
} |