Skip to content

Instantly share code, notes, and snippets.

View omerucel's full-sized avatar
🎯
Focusing

Ömer ÜCEL omerucel

🎯
Focusing
View GitHub Profile
@omerucel
omerucel / gist:8617a3a02a35393c6fbb0803d6236650
Last active May 24, 2021 14:04 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<html>
<head>
<title>Site Maintenance</title>
<meta charset="UTF-8">
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
import Cocoa
extension String {
func conformsTo(pattern: String) -> Bool {
let pattern = NSPredicate(format:"SELF MATCHES %@", pattern)
return pattern.evaluate(with: self)
}
}
@omerucel
omerucel / pagination.html.twig
Last active January 25, 2018 12:34 — forked from SimonSimCity/pagination.html.twig
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
{#
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/
Updated by: Simon Schick <simonsimcity@gmail.com>
Parameters:
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
@omerucel
omerucel / Security.php
Created January 27, 2011 17:16 — forked from f/Security.php
<?php
class Security {
/**
* if(Security::checkInjection($value)) {
* error_log('Possible SQL/XSS injection attack detected with the request '.$value);
* }
*
* @param $value
* @return bool
@omerucel
omerucel / Security.php
Created January 27, 2011 17:15 — forked from f/Security.php
<?php
class Security {
/**
* if(Security::checkInjection($value)) {
* error_log('Possible SQL/XSS injection attack detected with the request '.$value);
* }
*
* @param $value
* @return bool