Skip to content

Instantly share code, notes, and snippets.

View preetjdp's full-sized avatar
:shipit:
Brainstorming

Preet Parekh preetjdp

:shipit:
Brainstorming
View GitHub Profile
@dipiash
dipiash / createTestClient.ts
Created November 11, 2020 19:12 — forked from preetjdp/createTestClient.ts
Allows to test Apollo GraphQL Server
/**
* The following file is an amalgamation of [Apollo Server Testing](https://github.com/apollographql/apollo-server/blob/main/packages/apollo-server-testing/src/createTestClient.ts)
* and [apollo-server-integration-testing](https://github.com/zapier/apollo-server-integration-testing),
* this allows the use of `headers` while making a request
*
* Credits to the original authors
*/
import express from 'express';
import { convertNodeHttpToRequest, runHttpQuery } from 'apollo-server-core';
@f3ath
f3ath / index.md
Last active June 26, 2020 10:43
Dart package release automation

Automating Dart package release in 3 steps

Everyone who maintains a Dart package has to maintain the changelog and release updates once in a while. It can become cumbersome to keep the pubspec version and the changelog in sync manually. These two small tools can make release process fun.

1. Install the tools

pub global activate change
pub global activate pubspec_version
@HarshKapadia2
HarshKapadia2 / cmd.md
Last active November 19, 2021 07:05
A guide for some basic Windows Command Prompt terms and commands
@slightfoot
slightfoot / media_query_extension.dart
Last active July 29, 2021 13:32
Media Query Extension - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@HarshKapadia2
HarshKapadia2 / my_path.md
Last active November 19, 2021 07:06
My web dev path, projects and resources.
@tingwei628
tingwei628 / docker-compose.yml
Created October 27, 2019 15:20
use postgresql and pgAdmin in docker
version: "3.4"
services:
pgAdmin:
restart: always
image: dpage/pgadmin4
ports:
- "8000:80"
environment:
PGADMIN_DEFAULT_EMAIL: 1234@admin.com
@koladilip
koladilip / get-rows-count-by-table-of-mysql-db.sql
Created July 1, 2019 16:16
Get Rows counts from all the tables of MySQL DB
DELIMITER $$
CREATE PROCEDURE `COUNT_ROWS_COUNTS_BY_TABLE`(dbName varchar(128))
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE TNAME CHAR(255);
DECLARE table_names CURSOR for
SELECT CONCAT("`", TABLE_SCHEMA, "`.`", table_name, "`") FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = dbName;
@mick88
mick88 / url.sh
Created August 15, 2016 10:11
Open url in Android throughy adb
#!/bin/bash
adb shell am start -a android.intent.action.VIEW -d https://www.google.com/
@Rich-Harris
Rich-Harris / service-workers.md
Last active January 6, 2026 09:45
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@r4dian
r4dian / transfer.sh.ps1
Last active March 16, 2024 14:26
Upload to transfer.sh from Powershell
function transfer ($filename)
{
$file = Get-Item $filename;
invoke-webrequest -method put -infile $file.FullName https://transfer.sh
}
"Test" | Set-Content .\test.txt
transfer(".\test.txt")