Skip to content

Instantly share code, notes, and snippets.

View fatihacet's full-sized avatar
🤙

Fatih Acet fatihacet

🤙
View GitHub Profile
@fatihacet
fatihacet / app.js
Last active February 1, 2017 15:38
Generic Vue validation
new Vue({
el: '#app',
methods: {
validate() {
VueValidator(this, () => {
console.log('single input is valid');
});
}
}
})
@fatihacet
fatihacet / input.scss
Last active August 8, 2016 21:55
Use Scss map and map_get to get dynamic variables from map.
$white_foo_bar: #FFF;
$map: (
foo: 'foo',
bar: 'bar',
baz: 'white',
foowhite: 'foowhitecolor'
);
@mixin foo($type) {
//import the selenium web driver
var webdriver = require('selenium-webdriver');
var chromeCapabilities = webdriver.Capabilities.chrome();
//setting chrome options to start the browser fully maximized
var chromeOptions = {
'args': ['--test-type', '--start-maximized']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build();
@fatihacet
fatihacet / package.json
Created June 1, 2015 14:35
Easily switch between your two predefined themes for Sublime Text.
{
"name": "themeswitch",
"version": "0.0.1",
"description": "Easily switch between your two predefined themes for Sublime Text.",
"dependencies": {},
"devDependencies": {
"coffee-script": "^1.9.3",
"json-format": "0.0.1"
},
"author": "Fatih Acet <fatih@fatihacet.com>"
@fatihacet
fatihacet / sublime.conf.json
Last active May 6, 2019 07:33
sublime.conf
{
"close_windows_when_empty": false,
"color_scheme": "Packages/One Dark Color Scheme/One Dark.tmTheme",
"detect_indentation": false,
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"env":
{
"PATH": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/share/npm/bin/"
},
@fatihacet
fatihacet / alert.js
Last active August 29, 2015 14:13
alert.js
window.IDE.appControllers.helloworld = function() {
time = new Date().toString().match(/(\d\d:\d\d:\d\d)/)[0];
view = new KDCustomHTMLView({
tagName: 'h2',
partial: 'HELLO WORLD APP LOADED at ' + time + ' !!!'
});
return view;
}
@fatihacet
fatihacet / karma.conf.js
Created December 20, 2014 14:44
Sample karma.conf.js
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'build/js/**/*.js',
'build/tests/**/test_*.js'
],
exclude: [
],
describe 'Box', ->
beforeEach ->
box = new Box
top : 200
right : 400
bottom : 400
left : 100
@fatihacet
fatihacet / Box.coffee
Last active August 29, 2015 14:11
Sample Box class for FE-CI blog post.
class Box
###*
Class for representing a box. A box is specified as a top, right, bottom
and left.
@constructor
@param {Object} options Options object to hold top, right, bottom
and left values.
###
@fatihacet
fatihacet / Gruntfile.coffee
Last active August 29, 2015 14:11
Sample Gruntfile
module.exports = (grunt) ->
grunt.initConfig
coffee :
options :
bare : yes
src :
files : [
expand : yes