Skip to content

Instantly share code, notes, and snippets.

View devzom's full-sized avatar
👷‍♂️
Coding for life and fun

Jakub Zomerfeld devzom

👷‍♂️
Coding for life and fun
View GitHub Profile
@devzom
devzom / debug.css
Last active November 17, 2020 14:59
CSS: debugging -> debug attribute for html element with overlays
/*! debug.css | MIT License |
Jakub Zomerfeld
/* Instruction:
just add an 'debug' attribute to main html element ex.
<div id="#app" debug>
</div>
*/
[debug], [debug] *:not(g):not(path) {
color: hsla(210, 100%, 100%, 0.9) !important;
@devzom
devzom / .htaccess
Created October 20, 2020 10:50
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@devzom
devzom / JS-setPseudoElementContent.js
Last active October 15, 2020 08:46
JS: set pseudo element content :before OR :active
/*
* github.com/devzom / Jakub Zomerfeld
* * (c) 15 / 10 / 2020
* Function for setting an pseudo element property :after / :before
*/
//
// ES6<
function setPseudoElementContent(selector, value) {
document.styleSheets[0].addRule(selector, 'content: "' + value + '";');
}
@devzom
devzom / basic_gulp4.js
Created October 9, 2020 06:03
GULP: Basic configuration for GULP 4
const {src, dest, watch, series, parallel} = require('gulp'); //ES destructuring assignment
var sass = require("gulp-sass"),
autoPrefixer = require("gulp-autoprefixer"),
minifyCss = require("gulp-clean-css"),
rename = require("gulp-rename"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
plumber = require("gulp-plumber"),
util = require("gulp-util"),
@devzom
devzom / MySQL: Generate slug from ex. name.txt
Last active August 28, 2020 17:18
MySQL: Generate slug from ex. name
A slug is a short name using human-readable keywords to identify a web page. For example, in the following URL
http://www.example.com/schools/new-york-art-school
the slug is new-york-art-school. This post shows how to automatically generate slug using SQL in MySQL.
Suppose we have a table schools a field name, and we wish to generate a slug for each school using the name. First, add one field for the slug.
@devzom
devzom / DartBasicsTest.dart
Created March 29, 2020 10:08
Testing Dart basics
//////////// abstract classes, interfaces, mixins
enum TeacherType { mathematican, biologist, physics }
abstract class Person {
TeacherType teacherType;
void teach();
}
mixin Language {
@devzom
devzom / AdbCommands
Created March 21, 2019 09:54 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell