Skip to content

Instantly share code, notes, and snippets.

View edkf's full-sized avatar

Edgard Kozlowski edkf

View GitHub Profile
@zehfernandes
zehfernandes / pliim-turnOff.scpt
Last active December 17, 2023 22:15
One click and be ready to go up on stage and shine! - https://zehfernandes.github.io/pliim/
# Turn on Notifications
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref
# Show Desktop
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder"
# Show all windows
tell application "System Events"
set visible of (every process) to true
end tell
@kaisermann
kaisermann / macOS.md
Last active January 1, 2024 06:09
Useful CLI

MacOS exclusive

  • Open and bring to front a specific app
osascript -e "tell application \"APP\" -e "activate" -e "end tell"
osascript -e 'tell app "Terminal" to activate'
osascript -e 'tell app "Terminal" to do script "cmatrix"'
@icamys
icamys / gulpfile.js
Last active December 29, 2018 01:42
Gulp 4 gulpfile.js (assets builder + JSCS + JSHint)
/*jslint node: true */
'use strict';
// ## Globals
var argv = require('minimist')(process.argv.slice(2));
var autoprefixer = require('gulp-autoprefixer');
var changed = require('gulp-changed');
var concat = require('gulp-concat');
var gulp = require('gulp');
var gulpif = require('gulp-if');
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@alexandremcosta
alexandremcosta / universidades.csv
Last active November 14, 2023 15:45
Lista de Todas as Universidades do Brasil (retirado do portal de indicadores do INEP/ENADE)
ACADEMIA DA FORÇA AÉREA AFA SP
ACADEMIA DA POLÍCIA CIVIL DO ESTADO DA BAHIA ACADEPOL BA
ACADEMIA DE POLÍCIA MILITAR DO BARRO BRANCO APMBB SP
ACADEMIA DE POLÍCIA MILITAR DOM JOÃO VI APMDJVI RJ
ACADEMIA DE POLÍCIA MILITAR APM BA
ACADEMIA MILITAR DE AGULHAS NEGRAS AMAN RJ
ANHANGUERA EDUCACIONAL S.A. UNIANHANGUERA RS
ANHANGUERA EDUCACIONAL AESA SP
ASSOCIAÇÃO CATARINENSE DE ENSINO ACE SC
ASSOCIAÇÃO DE ENSINO SUPERIOR DO PIAUÍ AESPI PI
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@gschema
gschema / intro.md
Last active November 27, 2023 04:35
Basic JavaScript MVC Implementation

Basic JavaScript MVC Implementation

Despite being derived from classical MVC pattern JavaScript and the environment it runs in makes Javascript MVC implementation have its own twists. Lets see how typical web MVC functions and then dive into simple, concrete JavaScript MVC implementation.

How Web MVC typically works

Typical server-side MVC implementation has one MVC stack layered behind the singe point of entry. This single point of entry means that all HTTP requests, e.g. http://www.example.com or http://www.example.com/whichever-page/ etc., are routed, by a server configuration, through one point or, to be bold, one file, e.g. index.php.

At that point, there would be an implementation of Front Controller pattern which analyzes HTTP request (URI at first place) and based on it decides which class (Controller) and its method (Action) are to be invoked as a response to the request (method is name for function and member is name for a variable when part of the class/object).