Skip to content

Instantly share code, notes, and snippets.

View akvsh-r's full-sized avatar
🙀
Building cat army to conquer the world!

Akash R akvsh-r

🙀
Building cat army to conquer the world!
View GitHub Profile
/*
* Copyright (c) 2018 - Present, Co.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are not permitted.
*/
import { Types } from 'mongoose';
import { Service } from 'typedi';
import * as React from 'react';
import { compose, withApollo, WithApolloClient } from 'react-apollo';
import { Input, Icon, Avatar } from 'antd';
import { IGroup } from '../interfaces';
import { GROUPS } from '../queries';
const SearchInput = Input.Search;
export interface IGroupSearchState {
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
@akvsh-r
akvsh-r / nodejs-tcp-example.js
Created August 26, 2018 13:39 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@akvsh-r
akvsh-r / RegistersUsers.php
Created May 1, 2018 18:13
Laravel Passport API Login after registration
<?php
namespace Illuminate\Foundation\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Auth\Events\Registered;
trait RegistersUsers
{
@akvsh-r
akvsh-r / index.js
Created April 11, 2018 20:30 — forked from loic-moriame/index.js
node.js + sequelize + sqlite
'use strict';
var Sequelize = require('sequelize');
var sequelize = new Sequelize('mainDB', null, null, {
dialect: "sqlite",
storage: './test.sqlite',
});
sequelize
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
@akvsh-r
akvsh-r / podforceupdate.sh
Created March 18, 2018 09:49 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@akvsh-r
akvsh-r / ssl-steps
Created November 20, 2017 10:51
Steps to install ssl on linux using certbot
First you need to clone the repo
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
Now we are going to create a certificate
NGINX
./letsencrypt-auto certonly --rsa-key-size 4096
Now, please follow the instructions. When it's finished you will be able to find the certificate, chain and key at /etc/letsencrypt/live/domain