Skip to content

Instantly share code, notes, and snippets.

View mindaslab's full-sized avatar

Karthikeyan A K mindaslab

View GitHub Profile
@mindaslab
mindaslab / easy_rails_deployment_with_capistrano.md
Created November 5, 2022 17:30
Easy Rails deployment with Capistrano

Goals of this tutorial:

  • deploy a new Rails app with capistrano
  • make it fast (total process takes less than 5 minutes)
  • make it simple (no unecessary config)
  • manual ssh to the server not required

Rails application stack:

  • nginx
  • unicorn
  • postgresql
@mindaslab
mindaslab / apkdl.sh
Created November 20, 2019 03:14 — forked from arulrajnet/apkdl.sh
Script to download apk file from Google Play a.k.a Android Market.
#!/bin/bash
#
# Script to download apk file from Google Play a.k.a Android Market.
# Accepts package name or Google Play URL as input.
# Files are download from apk-dl.com
# author : Arul (@arulrajnet)
#
APK_DL_URL="http://apk-dl.com/store/apps/details?id=%s"
PACKAGE_NAME=""
#include <stdio.h>
int main(){
printf("Hello World!");
return 0;
}
@mindaslab
mindaslab / whatapp_stupidity.ipynb
Last active January 27, 2019 14:26
WhatsApp Stupidity
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mindaslab
mindaslab / butterfly.txt
Created May 13, 2018 15:59
Write a program to produce the following output
Enter wing size: 11
***********************
*********************
*******************
*****************
***************
*************
***********
*********
@mindaslab
mindaslab / example_ouput.sh
Created May 12, 2018 05:50
Write a program that does the following
Enter first number: 1
Enter second number: 50
3 Hello!
5 World!
6 Hello!
9 Hello!
10 World!
12 Hello!
15 Hello World!
18 Hello!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mindaslab
mindaslab / rocket_chat.log
Created April 5, 2018 08:40
rocket chat mongo error
-- Logs begin at Wed 2018-04-04 14:24:57 UTC, end at Wed 2018-04-04 15:33:58 UTC. --
Apr 04 15:08:09 Trudata systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: cat: /var/snap/rocketchat-server/common/mongod.pid: No such file or directory
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: error: process ID list syntax error
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: Usage:
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: ps [options]
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: Try 'ps --help <simple|list|output|threads|misc|all>'
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: or 'ps --help <s|l|o|t|m|a>'
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: for additional help text.
Apr 04 15:08:10 Trudata rocketchat-server.rocketchat-server[2163]: For more details see ps(1).
@mindaslab
mindaslab / local_storage.js
Last active August 2, 2016 17:27
Javascript local storage
var testObject = { 'one': 1, 'two': 2, 'three': 3 };
// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));
// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');
console.log('retrievedObject: ', JSON.parse(retrievedObject));