Skip to content

Instantly share code, notes, and snippets.

View sneakersgames's full-sized avatar

Octavian Susnea sneakersgames

  • SneakersGames
  • Belgium
View GitHub Profile
require('dotenv').config()
const cors = require('cors')
const bodyParser = require('body-parser')
const express = require('express')
const expressJwt = require('express-jwt')
const cookieSession = require('cookie-session')
const jwt = require('jsonwebtoken')
const passport = require('passport')
const GoogleStrategy = require('passport-google-oauth20').Strategy
const jwtSecret = Buffer.from('Zn8Q5tyZ/G1MHltc4F/gTkVJMlrbKiZt', 'base64')
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active July 21, 2024 12:41
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@glinton
glinton / dbTunnel.md
Created July 6, 2017 17:31
Share app databases on nanobox (experimental, non-recommended, and non-supported)

Tunnel to your other app's shared database

This requires two apps that you own/have access to. For clarity, we'll refer to the app with the shared database as the "server" app, and the one wanting to connect, the "client" app. This is not recommended nor supported by nanobox.

Note: You'll need to ensure NANOBOX_USERNAME and NANOBOX_PASSWORD are set on your "client" app

Manual Walkthrough

Fetch the nanobox binary. Run from your client component(s) in your client app

@TiuTalk
TiuTalk / gist:dd18b2797f9bbddce8dc
Last active May 19, 2021 23:59
CakePHP on Heroku

CakePHP via composer

composer.json

{
  "name": "assando-sites",
  "require": {
    "cakephp/cakephp": ">=2.5.0",
    "ext-apcu": "*",

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@dhenze
dhenze / bootstrap-typeahead.js
Created January 10, 2013 13:55
This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions. For example, process typeahead list asynchronously and return objects This is an adoption of gudburgurs gist to Version 2.2.2 of Bootstrap. See https://gist.github.com/1866577
/* =============================================================
* bootstrap-typeahead.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@ruslanas
ruslanas / typeahead_with_id.js
Created September 10, 2012 23:26
Typeahead with id
/*
* CakePHP Twitter Bootstrap Typeahead with id
* ProjectsController.php
* <?php $this->set('projects', $this->Project->find('list'); $this->render('list', 'ajax'); ?>
* /app/View/Projects/list.ctp
* <?php echo json_encode($projects); ?>
* data = {'id': 'item name', ..};
* /app/View/Tasks/index.ctp
* <input type="hidden" id="TaskProjectId" name="data[Task][project_id]"/>
* <input autocomplete="off" data-provide="typeahead" class="typeahead" type="search" id="TaskProject">
@fat
fat / Tokenahead.less
Created April 18, 2012 04:01
Tokenahead - ghetto typeahead with facebook-like tokens 4 @couch <3
// Tokenahead.less
// ---------------
.tokenahead {
cursor: text;
overflow: hidden;
height: auto;
padding-bottom: 0;
border-color: @inputBorder;
}