Skip to content

Instantly share code, notes, and snippets.

View jsakhil's full-sized avatar
🎯
Focusing

Js Akhil jsakhil

🎯
Focusing
View GitHub Profile
@jsakhil
jsakhil / Online KMS Activator.cmd
Created August 10, 2019 09:48 — forked from bhandarisaurav/Online KMS Activator.cmd
Activate Windows & Office for 180 Days with online KMS Servers. This script does not install any files in your system and it clears all the leftovers including kms server name after the Activation. For Successful Activation, Internet Must be connected.
@echo off
::::::::::::::::::::::::::::
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
:GotPrivileges
::::::::::::::::::::::::::::
color 1F
@jsakhil
jsakhil / metal-widget.js
Created April 22, 2020 15:53
Gold & Silver Rate Widget
$.ajax({
url: 'https://data-asg.goldprice.org/dbXRates/USD',
dataType: 'text',
success: function(response) {
var prices = JSON.parse(response).items[0];
var goldp = prices.xauPrice;
var goldx = prices.chgXau;
var golds = (prices.xauPrice > prices.xauClose) ? 'up' : 'down';
var silverp = prices.xagPrice;
var silverx = prices.chgXag;
@jsakhil
jsakhil / colors.scss
Created November 9, 2020 14:08
Color loop in Scss
$colors: ("blue", #0000ff, "green", #008000, "orange", #fca644);
@for $index from 1 through length($colors){
div:nth-child(#{length($colors)}n + #{$index}) {
color: unquote(nth($colors, $index));
}
}
@jsakhil
jsakhil / slick_dots.js
Created May 11, 2021 08:30
DYNAMIC SLICK DOTS
// DYNAMIC SLICK DOTS
function dynamic_slick_dots(slickItem, slickLimit){
if($(slickItem).length < slickLimit){
$(slickItem).parents('.slick-slider.slick-dotted').find('ul.slick-dots').hide();
}
}
// DYNAMIC SLICK DOTS
dynamic_slick_dots('.slick_slide:not(.slick-cloned)', 4);
@jsakhil
jsakhil / FormsModulePlugin.php
Created April 19, 2022 13:47
FormsModulePlugin.php | File Path /core/anomaly/forms-module/src | getField for Mail Notification | {{ forms_getField(input,'field_slug') | raw }}
<?php namespace Anomaly\FormsModule;
use Anomaly\FormsModule\Form\Contract\FormRepositoryInterface;
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentInterface;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Support\Decorator;
use Anomaly\Streams\Platform\Support\Presenter;
/**
@jsakhil
jsakhil / ajax.autosave.naive.html
Created April 14, 2022 09:48 — forked from sweetleon/ajax.autosave.naive.html
naive AJAX auto-save implementation
<form method="POST" action="/our/url">
<textarea name="input" onChange="save(event)" />
</form>
<script language="javascript">
function save(event) {
var request = new XMLHttpRequest();
request.open(event.target.form.method, event.target.form.action);
request.send(new FormData(event.target.form));
}
@jsakhil
jsakhil / pyro.twig
Last active January 22, 2022 20:15
PyroCMS
// Setting Value
{{ setting_value('streams::field_slug', config_get('streams::distribution.field_slug')) }}
// Content View
{{ page.content.render | raw}}
// Content Exerpt View
{{ page.content | striptags | slice(0, 120) }}
// Multiple File View
@jsakhil
jsakhil / grid.css
Created January 16, 2022 08:21
CSS Grid Auto Fill Example
.grid_wrap {
width: 100%;
max-width: 100%;
display: grid;
margin: 0 auto;
grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
grid-auto-rows: 1fr;
grid-auto-flow: row dense;
grid-gap: 10px;
counter-reset: boxes;
@jsakhil
jsakhil / sign.html
Last active July 29, 2021 09:58
Signature Pad jQuery Plugin
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
<div class="signature-wrap">
// Add Form field signature_base_64 and assign it to the form, Field type must be WYSIWYG
<input type="hidden" class="signature_base_64" name="signature_base_64" value="" />
<div id="signature-pad">
<div class="custom-signature-pad--body">
<canvas id="custom-signature-pad" width="398" height="160" style="touch-action: none;"></canvas>
</div>
@jsakhil
jsakhil / insta.js
Last active July 26, 2021 14:06
Live Instagram Feed - Instagram API that fetches User Profile, Followers, Following, Images, Posts, Likes , Shares
$(document).ready(function(){
$.ajax({
url:"https://www.instagram.com/{username}/channel/?__a=1",
type:'get',
success:function(response){
posts = response.graphql.user.edge_owner_to_timeline_media.edges;
posts_html = '';
for(var i=0;i<8;i++){
url = posts[i].node.display_url;
post_shortcode = posts[i].node.shortcode;