TODO:
- FUCK BASH!
- Usage help text
- Proper validation
- Removal of
set -e
and proper error handling - Update functionality
- One client - multiple sites
- vhost, pool generation
- Data reuse (database user, ssh client etc.)
public class LogZipResponse : Response | |
{ | |
public LogZipResponse () | |
{ | |
this.Contents = GetLogZip(); | |
this.ContentType = "application/x-zip-compressed"; | |
this.StatusCode = HttpStatusCode.OK; | |
} | |
private Action<Stream> GetLogZip() |
class Scopes extends Eloquent | |
{ | |
public function scopeWeek($query) | |
{ | |
return $this->scopeTimeFrame($query, 'last week midnight'); | |
} | |
public function scopeMonth($query) | |
{ | |
return $this->scopeTimeFrame($query, 'last month midnight'); |
var donut = new ProgressMeter.Donut({ | |
fat : 20, | |
}, { | |
progress : Math.random() * 100, | |
keyframes : function(timeline, style) | |
{ | |
timeline.fromTo(style.meter, 0.5, { colorProps : { fill : 'lime' } }, { colorProps : { fill : 'orange' } }, 0); | |
timeline.to(style.meter, 0.5, { colorProps : { fill : 'red' } }, 0.5); | |
}, | |
complete : function() |
using UnityEditor; | |
using UnityEngine; | |
[CustomPropertyDrawer(typeof(SceneAssetPathField))] | |
public class SceneAssetPathFieldPropertyDrawer : PropertyDrawer | |
{ | |
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) | |
{ | |
var oldPath = AssetDatabase.LoadAssetAtPath<SceneAsset>(property.stringValue); |
using System.Reflection; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.Events; | |
using UnityEngine.SceneManagement; | |
public static class EditorExtensions | |
{ | |
private static FieldInfo sceneWasOpenedCallbackField; | |
private static FieldInfo SceneWasOpenedCallbackField |
TODO:
set -e
and proper error handlingWhat we are building here, is a simple homepage composed of pages of blocks.
Not a rich app, really "homepage" that may have various landing pages, has some navigation and bla bla, so... it's built around concept of "Pages", which in our case are defined by "Main" (section:main
) section type.
It is somewhat against the Don't model your content for display ideology of Sanity, but in this case it makes sense. We hold data in various documents where they make sense as documents and otherwise structure our pages with "blocks".
In Craft we used the Matrix field type to make the Blocks.
Sanity is much more looser in that sense, we would simply have an array of all the "block" object types.
We'll probably go ham with custom preview components later on. :D
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
import componentMapperFactory from '<path to>/componentMapperFactory' | |
import PictureDetail from './PictureDetail' | |
import CopyDetail from './CopyDetail' | |
import VideoDetail from './VideoDetail' | |
import SomeOtherDetailType from './SomeOtherDetailType' | |
export default componentMapperFactory({ | |
picture: PictureDetail, | |
copy: CopyDetail, |
.ContentItem { | |
&ApplicationForm { | |
+ * { | |
margin-top: 80rem; | |
} | |
* + &, &:first-of-type { | |
margin-top: 80rem; | |
} | |