Skip to content

Instantly share code, notes, and snippets.

@ajeetraina
ajeetraina / docker-compose.yml
Created Oct 29, 2017
Docker Compose File for MacVLAN Network Driver ( Single Node)
View docker-compose.yml
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
networks:
- myvlan
View app.py
from flask import Flask,render_template,url_for,request
import pandas as pd
import pickle
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.externals import joblib
app = Flask(__name__)
@jabernardo
jabernardo / fibonacci.c
Created Jun 9, 2019
Fibonacci Sequence
View fibonacci.c
#include <stdio.h>
int fib();
int main() {
// Normal
int term0 = 0, term1 = 0, term2 = 1;
printf("\n[Normal Method]\n");
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active Aug 18, 2019
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS
View Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
@lol-russo
lol-russo / workbench.colorCustomizations.json
Last active Aug 18, 2019
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
View workbench.colorCustomizations.json
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@vivekhaldar
vivekhaldar / church.js
Created Mar 4, 2016
Church numerals in ES6.
View church.js
//#!/usr/bin/env node --harmony
/*jshint esversion: 6 */
'use strict';
// Church numerals in ES6.
// c.f. https://en.wikipedia.org/wiki/Church_encoding
// Zero is the identity function.
let zero = (f => x => x);
@squarism
squarism / iterm2.md
Last active Aug 18, 2019
iterm2 cheatsheet
View iterm2.md

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@carolynvs
carolynvs / install-mono.sh
Last active Aug 18, 2019
Install Mono on Ubuntu
View install-mono.sh
wget http://download.mono-project.com/repo/xamarin.gpg
sudo apt-key add xamarin.gpg
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee --append /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
sudo certmgr -ssl -m https://go.microsoft.com
sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
sudo certmgr -ssl -m https://nuget.org
mozroots --import --sync
@eteubert
eteubert / feeds_unique.txt
Created Jul 12, 2013
List of Podcast RSS Feeds, extracted via iTunes API
View feeds_unique.txt
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main
@subfuzion
subfuzion / curl.md
Last active Aug 18, 2019
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

You can’t perform that action at this time.