Skip to content

Instantly share code, notes, and snippets.

View JeansBolong's full-sized avatar

JeansBolong JeansBolong

  • Jakarta - Indonesia
View GitHub Profile
@JeansBolong
JeansBolong / createLoader.js
Created September 18, 2017 09:12
React STUFF
constructor(){this.state = {isLoading: true} }
componentDidMount() { this.setState ({isLoading: false})}
render(){
return(
this.state.isLoading? *showLoadingScreen* : *yourPage()*)
}
@JeansBolong
JeansBolong / webpack.config.js
Last active October 22, 2017 12:15
Webpack Config
// var webpack = require("webpack");
const path = require('path');
module.exports ={
entry: "./src/client.js",
output:{
path: path.resolve(__dirname, 'dist/assets/js'),
filename: "bundle.js",
publicPath: "assets/js"
},

add new field db.getCollection('collectionname').update({},{$set:{fieldname:"value"}},false,true)

remove field db.getCollection('collectionname').update({}, {$unset: {fieldname:1}}, false, true);

@JeansBolong
JeansBolong / color-mixins.scss
Last active August 29, 2017 04:22
SASS + two different color themes
// Defining colors ===========================================
$color-names : '';
$light-colors : '';
$dark-colors : '';
@mixin define-theme-color( $color-name, $light-color, $dark-color ) {
@if ($color-names != "") and (index($color-names, $color-name) != false) {
@warn "Theme color $color-name is already defined";
module.exports = function(grunt){
grunt.initConfig({
copy:{
css:{
files:[
{
cwd: 'folder/source/file',
src: '**/*.css',
dest: 'folder/target/',
expand: true
@JeansBolong
JeansBolong / Magento2.md
Last active April 2, 2023 06:50
Magento2 CheatSheet

Magento 2 tutorial

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/bk-frontend-dev-guide.html
https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-1
https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-2
http://alanstorm.com/category/magento-2/

I have installed Magento 2 successfully, but icons are not displaying and not able to click anywhere in backend.

Please try running following command.

@JeansBolong
JeansBolong / color selection.css
Last active October 22, 2017 12:17
Some css tips and trik
::selection {
background: #eac06e; /* Safari */
color: white;
}
::-moz-selection {
background: #eac06e; /* Firefox */
color: white;
}
@JeansBolong
JeansBolong / run-it.php
Created July 11, 2016 09:31
Update your Twitter status using PHP
<?php
// Send a Tweet to your Twitter account.
tweetThis('my_user_name', 'my_password', 'my_tweet_message');
?>
@JeansBolong
JeansBolong / _mixin.scss
Last active October 27, 2017 03:35
css preprocessor CheatSheet
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
@mixin animate-time($time){
-webkit-animation-duration: $time;
-mos-animation-duration: $time;
@JeansBolong
JeansBolong / Capitazile word.js
Last active November 5, 2021 04:26
Javascript CheatSheet
function titleCase(str) {
var words = str.split(" ");
var newArray = [];
for(var i=0; i < words.length; i++){
newArray.push(words[i].slice(0,1).toUpperCase() + words[i].slice(1).toLowerCase());
}
return newArray.join(" ");