Skip to content

Instantly share code, notes, and snippets.

View slackero's full-sized avatar
:octocat:
Working from home

Oliver Georgi slackero

:octocat:
Working from home
  • At home in Europe
  • 22:18 (UTC +01:00)
  • X @slackero
View GitHub Profile
@consti
consti / hosts
Last active March 27, 2024 22:13
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
xcode-select --install
# Install dependencies
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype
# Dirs
mkdir -p /Applications/MAMP/bin/php/php7.1.12/include
cd /Applications/MAMP/bin/php/php7.1.12/include
# Download PHP 7.1.12 sources
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@remy
remy / trim-canvas.js
Last active September 21, 2023 13:58
Trims the surrounding transparent pixels from a canvas
// MIT http://rem.mit-license.org
function trim(c) {
var ctx = c.getContext('2d'),
copy = document.createElement('canvas').getContext('2d'),
pixels = ctx.getImageData(0, 0, c.width, c.height),
l = pixels.data.length,
i,
bound = {
top: null,
@Haraguroicha
Haraguroicha / showModalDialog.js
Created March 23, 2016 01:03
alternative function of showModalDialog for Chrome
///========================================
/// showModalDialog.js
///
/// Created by Haraguroicha 2014-10-06
///========================================
(function() {
window._smdName = window._smdName || Math.round(Math.random() * 1000000000);
window.spawn = window.spawn || function(gen) {
function continuer(verb, arg) {
var result;