Skip to content

Instantly share code, notes, and snippets.

@MajidSafari
MajidSafari / Question ld+json
Created September 4, 2019 17:55
Question ld+json
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage","mainEntity": [
{"@type": "Question",
"name": "زمان دقیق اعلام نتایج کنکور سراسری چه زمانی است ؟
",
"acceptedAnswer": {
"@type": "Answer",
"text": "</p>
curl -XPUT '/fess.20190727/_settings' -d '{
"index": {
"max_result_window": 50000
}
}'
@MajidSafari
MajidSafari / csstool.css
Created December 29, 2018 19:39
css Tools
.no-border {
border: 0 !important;
}
.no-padding {
padding: 0 !important;
}
.no-margin {
margin: 0 !important;
@caifagithub I use hint.css and some javascript:
clipboard.on('success', event => {
if (event.text) {
showTooltip(event.trigger, 'copied!');
}
});
showTooltip(elem, msg) {
var classNames = elem.className;
elem.setAttribute('class', classNames + ' hint--right');
@MajidSafari
MajidSafari / gist:5b80729a885a190fe2f40093ca64ec59
Created May 7, 2018 10:03
Updating-Assembly-Redirects-with-NuGet
Get-Project –All | Add-BindingRedirect
@MajidSafari
MajidSafari / gist:6c3e196ea636c61066c767baa75b9138
Created January 7, 2018 18:54
MapPageRoute Breaks ActionLinks in Integrated MVC/WebForms App
routes.MapPageRoute("WebForms", "", "~/WebForms/Default.aspx", false, null, new RouteValueDictionary(new { controller = new IncomingRequestConstraint() }));
public class IncomingRequestConstraint : IRouteConstraint
{
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
{
return routeDirection == RouteDirection.IncomingRequest;
}
tf eula -accept
@MajidSafari
MajidSafari / Active Windows
Created November 21, 2017 08:59
فعال سازی ویندوز
توجه: برای فعال سازی این ویندوز می تونید از سرور kms ما استفاده کنید. برای این کار Command Prompt رو در حالت Elevated Privilege اجرا کنید (همون حالتی که با استفاده از کلیک راست و run as administrator بوجود میاد). بعد دستور زیر رو برای استفاده از سرور kms ما بزنید:
slmgr /skms kms.digiboy.ir
slmgr /ato
fess.201707091711/_settings
{
"max_result_window": 50000
}
string EncodedResponse = Request.Form["g-Recaptcha-Response"];
bool IsCaptchaValid = (ReCaptchaClass.Validate(EncodedResponse) == "True" ? true : false);
if (IsCaptchaValid) {
//Valid Request
}