Skip to content

Instantly share code, notes, and snippets.

Pralhad Shrestha teddywest32

Block or report user

Report or block teddywest32

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@teddywest32
teddywest32 / laravel-mongodb-sentinel
Created Aug 7, 2017 — forked from Bodom78/laravel-mongodb-sentinel
Use the Sentinel 2.x authentication package with Laravel 5.1 and MongoDB
View laravel-mongodb-sentinel
Work in Progress: More testing to be done.
At a glance Authentication, Activation, Throttle, Groups & Permissions seem to
be working.
Downside: Copy and modify files.
Upside: Not really much work to get it up and running.
Assumes you have Laravel 5.1, jenssegers/laravel-mongodb + session addon set up
and your app is namespaced to App/
@teddywest32
teddywest32 / RouteLinkProviderService.ts
Created Dec 14, 2016 — forked from klinki/RouteLinkProviderService.ts
RouteLinkProviderService - service which maps component into its route
View RouteLinkProviderService.ts
import {Routes, Route} from "@angular/router";
import {Injectable} from "@angular/core";
@Injectable()
export class RouteLinkProviderService {
protected routes: Routes;
protected routesByComponents = new Map<any, any>();
constructor(routes: Routes) {
@teddywest32
teddywest32 / MailGunBasicSendMail.java
Created Aug 30, 2016 — forked from hpsaturn/MailGunBasicSendMail.java
Send Mail basic implementation via MailGun API and Retrofit for Android
View MailGunBasicSendMail.java
import android.util.Base64;
import com.google.gson.Gson;
import com.hpsaturn.robotsanta.Config;
import com.hpsaturn.robotsanta.models.MailGunResponse;
import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.converter.GsonConverter;
import retrofit.http.Field;
View gulpfile.js
gulpfile.js
const elixir = require('laravel-elixir');
require('laravel-elixir-vue');
require('laravel-elixir-vueify');
elixir.config.sourcemaps = false;
elixir(mix => {
@teddywest32
teddywest32 / php-cs-fixer
Created Aug 12, 2016 — forked from mpalourdio/php-cs-fixer
@fabpot php-cs-fixer config for PhpStorm
View php-cs-fixer
parameters
--level=psr2 --verbose fix $FileDir$/$FileName$
working directory
$ProjectFileDir$
@teddywest32
teddywest32 / cartalyst-sentinel-composer-update.md
Created Mar 20, 2016
When i did composer update after removing from class aliases and providers, it gets installed.
View cartalyst-sentinel-composer-update.md

paladin@my-PC:~/Desktop/my-site$ composer update

php artisan clear-compiled Loading composer repositories with package information Updating dependencies (including require-dev)

  • Removing symfony/css-selector (v3.0.2)

  • Installing symfony/css-selector (v3.0.3) Loading from cache

  • Removing symfony/polyfill-mbstring (v1.1.0)

  • Installing symfony/polyfill-mbstring (v1.1.1)

@teddywest32
teddywest32 / cartalyst-composer-install-error.md
Last active Mar 20, 2016
Composer install error with SentinelServiceProvider
View cartalyst-composer-install-error.md

paladin@my-PC:~/Desktop/my-site$ composer install Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

  • Installing nikic/php-parser (v2.0.0) Loading from cache

  • Installing classpreloader/classpreloader (3.0.0) Loading from cache

@teddywest32
teddywest32 / 4chan.py
Created Feb 11, 2016
4chan images downloader
View 4chan.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Alexis Nootens <me@axn.io>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
@teddywest32
teddywest32 / eloquent.md
Created Feb 11, 2016 — forked from msurguy/eloquent.md
Laravel 4 Eloquent Cheat Sheet.
View eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@teddywest32
teddywest32 / extract_realm_database_android.sh
Created Feb 6, 2016 — forked from medyo/extract_realm_database_android.sh
Shell script that exports Realm database from a connected device
View extract_realm_database_android.sh
#!/bin/sh
ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.mobiacube.elbotola.debug"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/Medyo/Desktop/"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else
You can’t perform that action at this time.