Skip to content

Instantly share code, notes, and snippets.

View volkanceylan's full-sized avatar

Volkan Ceylan volkanceylan

  • Serenity.is
  • Istanbul
View GitHub Profile
@volkanceylan
volkanceylan / movie-migration-body
Last active October 21, 2023 21:08
Migration body for Movie Tutorial, Movie Table
Insert.IntoTable("Movie")
.Row(new
{
Title = "The Matrix",
Description = "A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its controllers.",
Storyline = "Thomas A. Anderson is a man living two lives. By day he is an average computer programmer and by night a hacker known as Neo. Neo has always questioned his reality, but the truth is far beyond his imagination. Neo finds himself targeted by the police when he is contacted by Morpheus, a legendary computer hacker branded a terrorist by the government. Morpheus awakens Neo to the real world, a ravaged wasteland where most of humanity have been captured by a race of machines that live off of the humans' body heat and electrochemical energy and who imprison their minds within an artificial reality known as the Matrix. As a rebel against the machines, Neo must return to the Matrix and confront the agents: super-powerful computer programs devoted to snuffing out Neo
public static void AppendSection(this IDictionary<string, RenderAsyncDelegate> args, string key, Func<dynamic, dynamic> text)
{
if (!args.ContainsKey(key))
{
args.Add(key, (async textWriter =>
{
await text("").WriteAction(textWriter);
}));
}
else {
this.toolbar.findButton('add-button').off('click').addClass('dropdown').html(
"<button type='button' class='button-outer' style='background: none' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>" +
"<span class='button-inner'>New Item<span class='caret'></span></span></button>" +
"<ul class='dropdown-menu'><li><a>test</a></li><li><a>test2</a></li></ul>");
@volkanceylan
volkanceylan / ServiceHandler.java
Created January 24, 2016 14:18
Login to Serenity services with android and call service
public class ServiceHandler {
public ServiceHandler() {
}
public static String POST(String url, List<String> params){
InputStream inputStream = null;
String result = "";p
try {
using Serenity.Data;
using System;
using System.Data.SqlClient;
namespace Serenity.Services
{
public class DeleteRequestHandlerFK<TRow> : DeleteRequestHandler<TRow>
where TRow: Row, IIdRow, new()
{
protected override void ExecuteDelete()
@volkanceylan
volkanceylan / GoogleMapSample_DashboardIndex.cshtml
Last active December 18, 2015 16:40
Add Google map to Serene dashboard
@section ContentHeader {
<h1>@LocalText.Get("Navigation.Dashboard")<small>@Html.Raw(Texts.Site.Dashboard.ContentDescription)</small></h1>
<script src="https://maps.googleapis.com/maps/api/js"></script>
}
<div id="MapContainer" style="width: 700px; height: 400px;">
</div>
<script type="text/javascript">
$(function() {