Skip to content

Instantly share code, notes, and snippets.

@fatihacet
fatihacet / just-number.js
Last active May 2, 2024 05:55
get only numbers in a string with regex
var k = '3dsaAdas2dAAASdasdasDŞ321ĞİÜEQWEWQ098"**?_Ü;SDA!22';
k.replace(/\D/g, '');
class FlipCounterView extends KDView
constructor : (options = {}, data = {}) ->
options.style ?= "dark"
options.from ?= 5000
options.to ?= 10000
options.interval ?= 1000
options.step ?= 1
options.autoStart ?= yes
options.direction = if options.from < options.to then "up" else "down"
options.digits ?= if options.direction is "up" then options.to.toString().length else options.from.toString().length
@fatihacet
fatihacet / flipcounterview.coffee
Last active May 2, 2024 05:55 — forked from burakcan/Coffee
FlipCounterView
class FlipCounterView extends KDView
constructor : (options = {}, data = {}) ->
options.style ?= "dark"
options.from ?= 5000
options.to ?= 10000
options.interval ?= 1000
options.step ?= 1
options.autoStart ?= yes
options.direction = if options.from < options.to then "up" else "down"
options.digits ?= if options.direction is "up" then options.to.toString().length else options.from.toString().length
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@fatihacet
fatihacet / fontello.css
Last active May 2, 2024 05:55
icon font sample usage
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?14391850');
src: url('../font/fontello.woff?14391850') format('woff'),
url('../font/fontello.ttf?14391850') format('truetype'),
url('../font/fontello.svg?14391850#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@fatihacet
fatihacet / app.js
Last active May 2, 2024 05:55
Generic Vue validation
new Vue({
el: '#app',
methods: {
validate() {
VueValidator(this, () => {
console.log('single input is valid');
});
}
}
})
@fatihacet
fatihacet / input.scss
Last active May 2, 2024 05: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();