Skip to content

Instantly share code, notes, and snippets.

Adrian Maseda amaseda

  • DC
Block or report user

Report or block amaseda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@amaseda
amaseda / sample-post.md
Last active Apr 13, 2017
sample-post.md
View sample-post.md

Sample Post

The below snippet is what you would see when viewing a post under the "Text" tab on the Wordpress post edit page.

Things to note...

  • There is a space between each distinct item. For example, there is an empty line both above and below the divider.
  • There is NO DIVIDER below the video. Just above it.
<img class="alignnone size-full wp-image-82171" src="http://www.allthingsgomusic.com/wp-content/uploads/2017/02/pwr-bttm-e1487360744368.jpg" alt="pwr bttm" width="660" height="440" />
@amaseda
amaseda / big-o-questions.md
Last active Mar 30, 2017
big-o-questions.md
View big-o-questions.md

Big-O Notation Exercises

What is the worst-case time complexity for the following algorithms?

#1

def word_occurrence(word, phrase)
  result = 0
  array  = phrase.split(' ')
@amaseda
amaseda / editorial-checklist.md
Last active Dec 7, 2017
editorial-checklist.md
View editorial-checklist.md

Preview

  • Did you preview the post and make sure that everything looks right?

Feed

  • Is there an excerpt?
  • Is there a feed image?
  • Does the feed image look correct (e.g., no cut-off text, no cut-off borders)
@amaseda
amaseda / code-wars-challenges-solutions.md
Created Feb 14, 2017
code-wars-challenges-solutions.md
View code-wars-challenges-solutions.md

Count Characters in a String

.forEach

function count(string) {  
  history = {}{
  string.split("")
        .forEach(char => {
          if(history[char]){
@amaseda
amaseda / encrypt-code-challenges.md
Last active Oct 12, 2016
encryption code challenges
View encrypt-code-challenges.md

Encryption Code Challenges

Team up with a partner and pick a code challenge. You will spend 15 minutes solving it individually. After 15 minutes -- even if you are not finished -- you will spend 10 minutes reviewing review each other's code. Some things to discuss

  • Approach
  • Where you got stuck
  • Opportunities for refactoring

Maskify

@amaseda
amaseda / follow-the-json.rb
Last active Jul 27, 2016
follow-the-json
View follow-the-json.rb
require "httparty"
def retrieve(id=nil)
url = "http://letsrevolutionizetesting.com/challenge.json"
if id
url += "?id=" + id
end
response = HTTParty.get(url)
new_id = response["follow"].split("?id=")[-1]
retrieve(new_id)
View seeds_example.rb
hall_oates = Artist.create({
name: "Hall & Oates",
photo_url: "greatest_band_evar.jpg",
nationality: "Philly"
})
limp_bizkit = Artist.create({
name: "Limp Bizkit",
photo_url: "fred_durst.png",
nationality: "Jacksonville"
View atg-fb-widget.md

Include the JavaScript SDK on your page once, ideally right after the opening tag.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=1705906936318742";
  fjs.parentNode.insertBefore(js, fjs);
View mapping-geojson-featurecollection.md
var featureCollection = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-77.0339403, 38.9048542]
      }
View mapping-marker-popup.md
map.on( "click", function( event ){
  var lat = event.latlng.lat,
      lng = event.latlng.lng;
  var marker = L.marker([lat, lng]).addTo(map);
  marker.bindPopup("<p>" + event.latlng.lat + "</p><p>" + event.latlng.lng + "</p>");
});
You can’t perform that action at this time.