Skip to content

Instantly share code, notes, and snippets.

View princeppy's full-sized avatar

👑 Prince Park 👑 princeppy

View GitHub Profile
@princeppy
princeppy / appify
Last active May 29, 2020 09:55 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
# https://gist.github.com/princeppy/dd3ca67e3233589aa7ab102568806f4b
# https://mathiasbynens.be/notes/shell-script-mac-apps
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:

XFCE Desktop


How to install XFCE Desktop Environment in Kali Linux:

Command:

apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies

How to remove XFCE in Kali Linux:

Command:

@princeppy
princeppy / install-wp-plugins.php
Created November 24, 2019 20:29 — forked from squarestar/install-wp-plugins.php
Programmatically install and activate wordpress plugins
<?php
/**
* Programmatically install and activate wordpress plugins
*
* Usage:
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the
* plugins you want to install and activate
* 2. Upload this file to the wordpress root directory (the same directory that contains the
* 'wp-admin' directory).
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export function withAppContext<
P extends { appContext?: AppContextInterface },
R = Omit<P, 'appContext'>
>(
Component: React.ComponentClass<P> | React.StatelessComponent<P>
): React.SFC<R> {
return function BoundComponent(props: R) {
return (
var request = require('request');
var jwt = require('jsonwebtoken')
function getAccessToken(req) {
//https://gist.github.com/demelziraptor/9039435 Python
//http://www.getcodesamples.com/src/A39B1460/F692912D PHP
req.session.sp_info = req.query;
req.session.sp_oauth = req.body;
var client_ID = "{{clientID}}"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
@princeppy
princeppy / redux-request-success-failure.js
Created February 24, 2019 17:27 — forked from gilankpam/redux-request-success-failure.js
redux-request-success-failure.js
function reduxHelper (actionName, fn) {
if (typeof actionName !== 'string') {
throw new Error('actionName must be a string')
}
if (typeof fn !== 'function') {
throw new Error('fn must be a function')
}
const actionNameUpper = actionName.toUpperCase()
const actionRequest = actionNameUpper + '_REQUEST'
const actionSuccess = actionNameUpper + '_SUCCESS'
@princeppy
princeppy / mapDispatchToProps.md
Created December 10, 2018 11:34 — forked from heygrady/mapDispatchToProps.md
Redux containers: mapDispatchToProps

Redux containers: mapDispatchToProps

This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.

@princeppy
princeppy / Gulpfile.js
Created July 28, 2018 09:27 — forked from DESIGNfromWITHIN/Gulpfile.js
Gulpfile.js example Uses browser-sync, node-neat, gulp and gulp-sass
/*
Gulpfile.js file for the tutorial:
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev
Steps:
1. Install gulp globally:
npm install --global gulp
@princeppy
princeppy / gulpfile.js
Created July 28, 2018 09:22 — forked from jbutko/gulpfile.js
BrowserSync + Gulp.js: Simple webServer + liveReload + watching CSS, HTML and SASS files
/**
* This example:
* Uses the built-in BrowserSync server for HTML files
* Watches & compiles SASS files
* Watches & injects CSS files
*
* More details: http://www.browsersync.io/docs/gulp/
*
* Install:
* npm install browser-sync gulp gulp-sass --save-dev