Skip to content

Instantly share code, notes, and snippets.

View vistajess's full-sized avatar
💯

Je Vi vistajess

💯
View GitHub Profile
@vistajess
vistajess / ubuntu-cheat-sheet.txt
Last active February 22, 2025 16:31
Ubuntu cheat sheet
# Ubuntu CLI Cheat Sheet 🚀
## 📂 File & Directory Management
```bash
ls -la # List all files, including hidden ones
pwd # Show current directory
cd /path/to/dir # Change directory
mkdir folder_name # Create a new folder
rm -rf folder_name # Remove a folder and its contents
cp file1 file2 # Copy a file
(function () {
'use strict';
angular.module('app').controller('plansController', plansController);
plansController.$inject = ['$rootScope', '$scope', '$http', '$q', '$document', 'appConstants', '$timeout', '$state', '$modal', '$stateParams', 'uiGridConstants', 'productionPlansService', 'localStorageService'];
function plansController($rootScope, $scope, $http, $q, $document, appConstants, $timeout, $state, $modal, $stateParams, uiGridConstants, productionPlansService, localStorageService) {
$document[0].title = $state.current.title;
var vm = this;
vm.appConstants = appConstants;
require('dotenv').config();
var path = require("path");
var webpack = require("webpack");
var stringify = require('stringify-object-values');
var PROD = JSON.parse(process.env.PROD_ENV || '0');
module.exports = {
entry: './src/app/app.js',
output: {
path: __dirname + '/build/',
//UI Component
<topbar-menu is-valet-online="$ctrl.isValetOnline" change-status-func="$ctrl.toggleVisibilityStatus()"></topbar-menu>
// JS Code
'use strict';
class ValetDashboardController {
/*@ngInject*/
constructor($q, $scope, $cookies , Pusher) {
class SlotService {
/*@ngInject*/
constructor($http,CONFIG_CONSTANTS,$q, AuthService) {
this.API_URL = CONFIG_CONSTANTS.API_URL;
this.$http = $http;
this.$q = $q;
this.api_token = AuthService.api_token;
}
getSlotList(floorId) {
require('dotenv').config();
var path = require("path");
var webpack = require("webpack");
var stringify = require('stringify-object-values');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
var PROD = JSON.parse(process.env.PROD_ENV || '1');
module.exports = {
entry: './src/app/app.js',
output: {
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 9,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 5,
"line_padding_top": 5,
"rulers":
Basics
1.Constants for ActionTypes
2.Actions based on actiontype
3.Reducer depends on constant
4.Store from redux
5.Views with Provider redux
6.connect state to props with connect in react-redux
Async HTTP Request using Redux
1.crete an action and import `axios` or other HTTP Library. Actions must have request, success and error status
var arr = ["aaa","bbb"];
console.time('native');
for (var i=0; i < arr.length; i++) {
console.log(arr[i]);
};
console.timeEnd('native');
console.time('jquery');
$.each(arr, function(i,v){
@vistajess
vistajess / gist:550e3b7c564a82d4cc87
Created December 31, 2015 19:24
Facebook autolike script
var likeButton = document.querySelectorAll('._48-k');
for(var i=0 in likeButton) {
// trigger the anchor element
likeButton[i].click();
}