Skip to content

Instantly share code, notes, and snippets.

View abhishekbhalani's full-sized avatar
🎄
working on latest framework...

Abhishek B. abhishekbhalani

🎄
working on latest framework...
View GitHub Profile
@abhishekbhalani
abhishekbhalani / 1_README.md
Created September 5, 2022 12:12 — forked from Daniel15/1_README.md
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@SackeyDavid
SackeyDavid / gist:d24315dd844d51b3e70af062fdcf5941
Created September 19, 2021 03:04
Turing Coding Challenge Practise Test - Problem 2
// console.log("Hello, World!");
var countElements = function(arr) {
var result = 0;
// output = 0;
// count elements
for (var i = 0; i < arr.length; i++) {
if(arr.includes(arr[i] + 1)) {
result+= 1
}
@aleclarson
aleclarson / rollup-typescript.md
Last active May 6, 2024 19:37
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

To customize the UI,

You can replace the current view with a new one. This is a customized account view: Create a file named Default.cshtml and put it in the folder Acme.BookStore\src\Acme.BookStore.Web\Themes\Lepton\Layouts\Account

@using System.Globalization
@using Microsoft.Extensions.Localization
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.MultiTenancy
rem Welcome to SmallBASIC
rem see https://github.com/anvaka/atree
nmax = 19
xScale = 6
zScale = 2.5
yScale = 16
startFrom = 0
dz = 400
redSpiralShadow = createSpiral(rgb(0x66,0,0), rgb(0x33,0,0), true, 1.01)
@abhishekbhalani
abhishekbhalani / MasterClass.cs
Last active December 6, 2019 12:04
Current Calculation Logic
public class CalculationA
{
public string str1 {get;set;}
public string str2 {get;set;}
// 40 around properties
}
public class CalculationB{
public string str3 {get;set;}
public string str4 {get;set;}
PS D:\projects> choco install redis
Installing the following packages:
redis
By installing you accept licenses for the packages.
Progress: Downloading redis 2.4.6.1... 100%
redis v2.4.6.1 [Approved] - Possibly broken
redis package files install completed. Performing other installation steps.
Attempt to get headers for http://ruilopes.com/redis-setup/binaries/redis-2.4.6-setup-64-bit.exe failed.
The remote file either doesn't exist, is unauthorized, or is forbidden for url 'http://ruilopes.com/redis-setup/binaries/redis-2.4.6-setup-64-bit.exe'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
[AllowAnonymous]
[HttpPost]
public async Task<IHttpActionResult> Register ([FromBody] CreateUserCommand command) {
return Ok (await new CommandAsync (command));
}
@Prezens
Prezens / gist:f99fd28124b5557eb16816229391afee
Created April 2, 2019 07:40
Apache .htaccess settings for Vue, vue-router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations
@cbdabner
cbdabner / DbMigrationTask.cs
Last active April 11, 2019 15:01
IStartupTask outside WebhostBuilder
public class DbMigrationTask<TDbContext> : IStartupTask
where TDbContext : DbContext
{
private readonly TDbContext _dbContext;
public DbMigrationTask(TDbContext dbContext)
{
_dbContext = dbContext;
}