Skip to content

Instantly share code, notes, and snippets.

View thomasbilk's full-sized avatar
💭
Git is for gits

Thomas Bilk thomasbilk

💭
Git is for gits
View GitHub Profile
@laurent22
laurent22 / javascript_warnings.md
Last active August 7, 2022 09:27
How many warnings should your JavaScript app have?

How many warnings should your JavaScript app have?

JavaScript warnings are these messages being displayed in yellow or red in your JavaScript console or terminal. They make no sense at all in general but they are a good indication of the health of your app. The points below will give you a general idea of how many warnings you should expect in your app:

  • 0 warnings: the app is not working at all

  • 5 warnings: app is probably starting but crashing soon after - try to find why it crashes. You'd think you could read the warnings to learn why it doesn't work, but that's not what warnings are for.

  • 50 warnings: That's the soft spot - most likely everything's running smoothly

@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active April 3, 2024 05:30
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2022 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
curlExists=$(command -v curl)
echo "Testing Postman version"
@mpalourdio
mpalourdio / php-cs-fixer
Created November 12, 2014 21:24
@fabpot php-cs-fixer config for PhpStorm
parameters
--level=psr2 --verbose fix $FileDir$/$FileName$
working directory
$ProjectFileDir$
@thomasbilk
thomasbilk / postgres.sql
Last active December 8, 2018 02:33
Solve Sudoku in SQL
WITH RECURSIVE x( s, ind ) AS
( SELECT sud, position( '.' IN sud )
FROM (SELECT '91.7......326.9.8...7.8.9...86.3.17.3.......6.51.2.84...9.5.3...2.3.149......2.61'::text
AS sud) xx
UNION ALL
SELECT substr( s, 1, ind - 1 ) || z || substr( s, ind + 1 )
, position('.' IN repeat('x',ind) || substr( s, ind + 1 ) )
FROM x
, (SELECT gs::text AS z FROM generate_series(1,9) gs) z
WHERE ind > 0
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@walterlua
walterlua / table_indexOf.lua
Created May 18, 2011 07:38
Implementation of JavaScript array.indexOf() in Lua. Also, adds the function to Lua's table library
-- table.indexOf( array, object ) returns the index
-- of object in array. Returns 'nil' if not in array.
table.indexOf = function( t, object )
local result
if "table" == type( t ) then
for i=1,#t do
if object == t[i] then
result = i
break
@karmi
karmi / git-hosting-apache.conf
Created July 21, 2010 07:43
Configuration for hosting Git repositories with Apache 2.x
# ----------------------------------------------------------
# Configuration for hosting Git repositories with Apache 2.x
# ----------------------------------------------------------
#
# This setup provides "dual URLS", where URL like <http://git.example.com/my_repository.git>
# loads Gitweb in the browser and the same URL can be used in commands like `git clone` and `git remote add`.
# It was compiled from some sources on the internet and further customized/tuned.
#
# Please see documentation for:
#