Skip to content

Instantly share code, notes, and snippets.

View alaa13212's full-sized avatar

Ali Albarrak alaa13212

View GitHub Profile
@alaa13212
alaa13212 / query.cs
Created August 24, 2022 17:39
Max and Count in one query
var result = await ctx.Blogs
.GroupBy(b => true)
.Select(g => new {
Max = g.Max(),
Count = g.Count()
})
.SingleAsync();
@alaa13212
alaa13212 / contectscript.js
Created July 13, 2022 16:11
Youtube Ultrawide 21:9 user script
let controlsParent = document.getElementsByClassName('ytp-right-controls')[0];
let buttonHtml = '<button class="ytp-ratio-button ytp-button" aria-label="Ratio" title="Ratio"><svg height="100%" version="1.1" viewBox="0 0 24 24" width="100%" transform="scale(0.75)"> <use class="ytp-svg-shadow" xlink:href="#ytp-id-1234"></use> <path d="M2 4h20v16H2V4zm2 14h16V6H4v12zM8 8h2v2H8v2H6V8h2zm8 8h-2v-2h2v-2h2v4h-2z" fill="#fff" fill-rule="evenodd" id="ytp-id-1234"/> </svg></button>';
controlsParent.children[controlsParent.children.length - 2]
.insertAdjacentHTML("afterEnd", buttonHtml);
const video = document.querySelector('video.html5-main-video');
let globalScale = 1;
const sheet = new CSSStyleSheet();
@alaa13212
alaa13212 / designer.html
Created January 3, 2015 18:28
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@alaa13212
alaa13212 / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-timetable">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@alaa13212
alaa13212 / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-scheduler-app">