Skip to content

Instantly share code, notes, and snippets.

View JCKodel's full-sized avatar
💭
GitHub trying to make a social network for the most antisocial people O.o

J.C.Ködel JCKodel

💭
GitHub trying to make a social network for the most antisocial people O.o
View GitHub Profile
@JCKodel
JCKodel / sample.json
Created April 9, 2023 21:21
pub.dev api sample
{
"gitHubRepo": {
"url": "https://api.github.com/repos/zeexan-dev/detect_fake_location",
"htmlUrl": "https://github.com/zeexan-dev/detect_fake_location",
"cloneUrl": "https://github.com/zeexan-dev/detect_fake_location.git",
"gitUrl": "git://github.com/zeexan-dev/detect_fake_location.git",
"sshUrl": "git@github.com:zeexan-dev/detect_fake_location.git",
"svnUrl": "https://github.com/zeexan-dev/detect_fake_location",
"mirrorUrl": null,
"id": 625659193,
@JCKodel
JCKodel / dart_analyzer.log
Created April 24, 2020 00:33
dart_analyzer.log
!! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 3.9.1
Flutter extension: 3.9.1 (not activated)
VS Code: 1.44.2
Platform: win
Workspace type: Flutter
Multi-root?: false
Dart SDK:
Loc: C:\Flutter\bin\cache\dart-sdk
// Copyright (c) 2018, the Zefyr project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:collection';
import 'dart:convert';
import 'package:quill_delta/quill_delta.dart';
import 'package:notus/notus.dart';
import 'package:html/parser.dart' show parse;
@JCKodel
JCKodel / MaskInput.ts
Created February 19, 2019 16:01
Stencil/Ionic MaskInput
import { IDictionary } from "../index";
import { InputChangeEventDetail } from "@ionic/core";
export interface ITokens
{
pattern?: RegExp;
transform?: (v: string) => string;
escape?: boolean;
}
@JCKodel
JCKodel / pull.js
Created February 16, 2019 17:26
Node git pull
#!/usr/bin/env nodejs
var http = require("http");
function pull(site)
{
return new Promise((resolve) =>
{
const g = require("simple-git")("/data/www/" + site);
g.pull((err, update) =>
@JCKodel
JCKodel / README.md
Last active July 21, 2023 07:46
VisualStudio StencilJS component template

Install:

  1. %USERPROFILE%\Documents to open Documents
  2. Open Visual Studio 20XX folder
  3. Open Templates folder
  4. Open ItemTemplates folder
  5. Open TypeScript folder
  6. Download each of these files into the TypeScript folder

Usage:

@JCKodel
JCKodel / swipeableTabs.tsx
Last active August 29, 2019 00:05
Hacky swipeable Ionic/Stencil tabs
import { Component } from "@stencil/core";
@Component({ tag: "page-tabs", styleUrl: "page-tabs.scss" })
export class PageTabs
{
private tabNames: Array<string>;
private slides: HTMLIonSlidesElement;
private tabs:HTMLIonTabsElement;
private getTabNames(tabs: HTMLIonTabsElement)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Remove item from array</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@JCKodel
JCKodel / ProcedureDependencies.sql
Created August 20, 2018 23:12
Obtendo uma lista de dependências de um procedure
SELECT
s.name + '.' + p.name AS procedureName
,(
SELECT DISTINCT
STUFF(REPLACE((SELECT '#!' + LTRIM(RTRIM(q.tableName)) AS 'data()'
FROM
(
SELECT DISTINCT
ts.name + '.' + t.name AS tableName
FROM sys.dm_sql_referenced_entities(s.name + '.' + p.name, 'OBJECT') AS r
@JCKodel
JCKodel / TablesLastUpdates.sql
Created August 20, 2018 23:09
Obtendo a última data de alteração de cada tabela
SELECT
q.tableName
,MAX(q.lastUpdate) AS lastUpdate
FROM
(
SELECT
s.name + '.' + t.name AS tableName
,ISNULL(u.last_user_update, '2000-01-01') AS lastUpdate
FROM sys.tables AS t
INNER JOIN sys.schemas AS s ON s.schema_id = t.schema_id