Skip to content

Instantly share code, notes, and snippets.

View garmjs's full-sized avatar
🏍️
Lover

Armend Gashi garmjs

🏍️
Lover
  • Prishtine
View GitHub Profile
@garmjs
garmjs / example.js
Last active July 29, 2022 17:20
React Delete item
let taskIndex = parseInt(e.target.value, 10);
console.log('remove task: %d', taskIndex, this.state.list[taskIndex]);
this.setState(state => {
state.list.splice(taskIndex, 1);
return {items: state.list};
});
@garmjs
garmjs / .editorconfig
Last active October 31, 2016 21:35
editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@garmjs
garmjs / mixin
Created June 25, 2015 22:15
themify
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
$themes: (
"theme-1": (
"color": red
),
"theme-2": (
@garmjs
garmjs / gist:dac5e084c370fc6a5285
Created June 24, 2015 14:58
Upgrade Node.js via NPM
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@garmjs
garmjs / scrollTriggers.js
Created September 22, 2014 16:00
scrollTriggers
var scrollTriggers = [
{ selector: ".media-vizioni", klass: "tada" },
{ selector: ".media-efektiviteti", klass: "tada" },
{ selector: ".media-krahasimi", klass: "tada" },
{ selector: ".media-dimensionet", klass: "flipInY" }
];
// on load, get the elements and their offsets
@garmjs
garmjs / map.js
Created September 18, 2014 15:10
Custom Google MAP
function init() {
var mapCanvas = document.getElementById('map_canvas');
var mapOptions = {
center: new google.maps.LatLng(find.latitude, find.longitude),
zoom: 17,
scrollwheel: false,
styles:
[
{
"stylers": [
@garmjs
garmjs / SassMeister-input-HTML.html
Created June 20, 2014 01:38
Generated by SassMeister.com.
<a href="#" class="btn">btn</a>
@garmjs
garmjs / SassMeister-input-HTML.html
Created June 20, 2014 00:53
Generated by SassMeister.com.
<div class="box home">
<h1>Lorem</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi, nobis!</p>
</div>
<div class="box about">
<h1>Lorem</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo, excepturi consequatur ipsa quod doloremque perferendis dolores itaque qui officia vitae architecto sunt laudantium praesentium impedit nam ab nulla vero quos.</p>
</div>
<div class="box contact">
<H1>Lorem</H1>
@garmjs
garmjs / SassMeister-input.scss
Created June 14, 2014 00:33
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@media screen and (min-width: 900px) {
@at-root (with: media) {
body {
background-color: lighten(red, 30%);
}
@garmjs
garmjs / 0_reuse_code.js
Created January 24, 2014 00:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console