Skip to content

Instantly share code, notes, and snippets.

View Godje's full-sized avatar
☢️
Chicken Butt

Daniel Mayovskiy Godje

☢️
Chicken Butt
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@Godje
Godje / simpleNum.js
Created June 14, 2017 05:47
Floor and Ceil to a certain digit. Javascript Function.
/*
let floored = floorNum(1430); //1000
let floored2 = floorNum(1430, 2); //1400
let ceiled = ceilNum(1430); //2000
let ceiled3 = ceilNum(1543, 3); //1550
*/
function floorNum(num, ind){
@Godje
Godje / no-jq.js
Last active August 1, 2016 22:52
function toggleClass(el, _class) {
if (el && el.className && el.className.indexOf(_class) >= 0) {
var pattern = new RegExp('\\s*' + _class + '\\s*');
el.className = el.className.replace(pattern, ' ');
}
else if (el){
el.className = el.className + ' ' + _class;
}
else {
console.log("Element not found :(")
@Godje
Godje / colloro.sass
Last active February 15, 2016 22:56
//
// COLLORO
// Colloro - nice bunch of colors, collected from different websites
// Bunch collected by Godje
//
$white: #fff
$dwhite: #f3f3f3
$black: #000