Skip to content

Instantly share code, notes, and snippets.

View wdss93's full-sized avatar
💭
Nice!

Wellington Daniel wdss93

💭
Nice!
View GitHub Profile
@wdss93
wdss93 / mac-clear-icon-cache.sh
Created October 30, 2024 15:31 — forked from ismyrnow/mac-clear-icon-cache.sh
Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@wdss93
wdss93 / js-nestGroupsBy.md
Created October 22, 2021 04:02 — forked from holmberd/js-nestGroupsBy.md
Dynamically create nested level groups by properties in Javascript

Dynamically create nested level groups by properties in Javascript

Code

/**
 * Creates nested groups by object properties.
 * `properties` array nest from highest(index = 0) to lowest level.
 *
 * @param {String[]} properties
 * @returns {Object}
@wdss93
wdss93 / remover-acentos.js
Created January 20, 2020 22:30 — forked from marioplumbarius/remover-acentos.js
Funcao marota para remover acentos de strings. Foi utilizado expressao regular em cima de caracteres representados na base hexadecimal.
/**
* Remove acentos de caracteres
* @param {String} stringComAcento [string que contem os acentos]
* @return {String} [string sem acentos]
*/
function removerAcentos( newStringComAcento ) {
var string = newStringComAcento;
var mapaAcentosHex = {
a : /[\xE0-\xE6]/g,
e : /[\xE8-\xEB]/g,
@wdss93
wdss93 / ID.js
Created November 18, 2019 21:10
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
import React, { Component } from 'react';
import { connect } from 'react-redux';
import axios from 'axios';
import {
Heading, Container
} from './styles';
import Iframe from 'react-iframe'
import Header from '../../components/Header';
git rebase -i HEAD~4 -x "git commit --amend --author 'Wellington Daniel <[email protected]>' --no-edit"
var svg = document.getElementsByTagName("svg")[0];
var bb=svg.getBBox();
var bbx=bb.x;
var bby=bb.y;
var bbw=bb.width;
var bbh=bb.height;
var vb=[bbx,bby,bbw,bbh];
svg.setAttribute("viewBox", vb.join(" ") );
@wdss93
wdss93 / keybindings.json
Created July 12, 2019 04:09
vscode keybidings
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
@wdss93
wdss93 / settings.json
Created July 12, 2019 04:08
vscode configuration
{
"files.associations": {
"*.sss": "sass"
},
"emmet.includeLanguages": {
"postcss": "css"
},
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": false,