Skip to content

Instantly share code, notes, and snippets.

@wilfriedE
wilfriedE / workit_scripts.sh
Last active January 28, 2018 23:45
virtualenv help script
function workonit() {
workon $( cat .venvname 2>/dev/null ) " " 2>/dev/null
}
function venvit(){
mkvirtualenv "${PWD##*/}" $*
echo "${PWD##*/}" > .venvname
}
function rmvenv() {

Keybase proof

I hereby claim:

  • I am wilfriede on github.
  • I am wilfriede (https://keybase.io/wilfriede) on keybase.
  • I have a public key ASBLJGQ_T7eztwrooU8kDh-U3w7BYN_8zuc6h6zfQZ5Lzwo

To claim this, I am signing this object:

@wilfriedE
wilfriedE / contact-form-servlet
Last active August 29, 2015 14:26 — forked from fizerkhan/contact-form-servlet
Google App Engine Servlet for Contact form
String name = req.getParameter("name");
String email = req.getParameter("email");
String message = req.getParameter("message");
// Create Mail message
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("support@acme.com",
"Acme Support Team"));
@wilfriedE
wilfriedE / Licence.md
Last active August 29, 2015 14:14
File converter for 2016-budget-data

The MIT License (MIT)

Copyright (c) 2015 Wilfried Hounyo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@wilfriedE
wilfriedE / jekyll-ed.rb
Last active August 29, 2015 14:07
Converting json based articles to html files for jekyll posts.
require 'json'
#parse the json file containing all the articles
posts = JSON.parse File.read("<article>.json")
#now for each article we will create a jekyll post
posts.each do |post|
title = post['title'] #the title of a post
content = post['content'] #the content or description of the post
image_url = post['image_url'] #the image url if it is available of the post (It is by default an empty string anyways)
@wilfriedE
wilfriedE / Guessing Game
Last active August 29, 2015 14:07
wilfriedE Blog
<script src="https://gist.github.com/wilfriedE/4697887.js"></script>
Reviewing ruby skills. This is a guessing game, made in ruby. With features such as range for guessing limit and maximum trials. It functions as a regular guessing game.
Strings default: (case insensitive), options: i => case sensitive
string #=> This returns regex for only string based (i.e String, example)
_string #=> This returns regex for strings including those with underscores
op_string #=> This returns regex for strings including all characters except space, tab or newline
______________________
Subdomains default: (case sensitive, lowecase), options: none
@wilfriedE
wilfriedE / ideas.md
Last active December 25, 2015 13:28
CRAZY + FUN IDEAS

##Make an App to interact with Spotify API. Spotify METADATA API

##Make an App to interact with Soundcloud API

Soundlcoud Api Docs