Skip to content

Instantly share code, notes, and snippets.

View jengel3's full-sized avatar

Jake jengel3

  • Chicago, Illinois
View GitHub Profile
@jengel3
jengel3 / hello-plugin-store.example.js
Last active November 7, 2022 11:00
Plugin Injection in NuxtJS
// store/index.js
export const actions = {
print ({ commit, dispatch }, message) {
this.$hello(message)
},
}
// ...
@jengel3
jengel3 / authentication-1.controller.ts
Last active April 23, 2024 19:26
NestJS - Implementing Access & Refresh Token Authentication
// app/modules/authentication/authentication.controller.ts
import { Body, Controller, Post } from '@nestjs/common'
import { RegisterRequest } from './requests'
import { User } from '../../modules/user'
import { UsersService } from '../users/users.service'
@jengel3
jengel3 / auth.js
Last active April 13, 2023 12:06
Vue/Nuxt JWT Authentication Implementation
// store/auth.js
// reusable aliases for mutations
export const AUTH_MUTATIONS = {
SET_USER: 'SET_USER',
SET_PAYLOAD: 'SET_PAYLOAD',
LOGOUT: 'LOGOUT',
}
export const state = () => ({
@jengel3
jengel3 / after.sh
Last active July 3, 2019 03:25 — forked from goobeck/after.sh
Homestead Oracle instant client (oci8, pdo_oci)
#!/bin/bash
sudo apt-get update
sudo apt-get install -y alien wget
mkdir downloads
cd downloads
# official oracle instant client http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
@jengel3
jengel3 / parser-output.py
Last active November 23, 2016 07:33
Flex Output Parser
import xml.etree.ElementTree as et
import xml.etree.cElementTree as et
import lxml.etree as et
import os as os
e = et.parse('com.burbn.instagram.dat').getroot()
items = list(e[0])[1]
descriptors = {}
for child in items:
clazz_name = None
dlopen("/usr/lib/libclassdumpdyld.dylib",RTLD_NOW);
dumpBundle=@encode(id(id))(dlsym(RTLD_DEFAULT,"dumpBundle"));
dumpBundle([NSBundle mainBundle]);
dumpBundle([NSBundle bundleWithIdentifier:@"com.apple.UIKit"]);
<div id="calendar-placeholder"></div>
<script id="calendar-widget" type="text/x-handlebars-template">
<div class="widget calendar">
<div class="calendar-header">
<div class="back-arrow"><<</div>
<div class="current-date"></div>
<div class="forward-arrow">>></div>
</div>
@jengel3
jengel3 / dpkg-gettext.pl
Created August 24, 2015 00:28
Dpkg Scripts Windows
#!/usr/bin/perl -w
use strict;
use warnings;
# Copied from /usr/share/perl5/Debconf/Gettext.pm
use strict;
BEGIN {
eval 'use Locale::gettext';
if ($@) {
@jengel3
jengel3 / contacts.py
Created April 6, 2015 04:17
Add all users in a Skype group
def addContacts():
import Skype4Py
skype = Skype4Py.Skype()
skype.Attach()
client = Skype4Py.client.Client(skype)
for chat in skype.Chats:
if len(chat.Members) > 50:
print chat.Name
for user in chat.Members:
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"