Skip to content

Instantly share code, notes, and snippets.

View hvent90's full-sized avatar

Henry Ventura hvent90

View GitHub Profile
# import libraries
import urllib2
from bs4 import BeautifulSoup
def getArticles(soup):
return soup.find_all('item')
def getHeadline(soup):
return soup.find('title').string
Process: imgshare [3368]
Path: /Users/USER/Downloads/imgshare 6.app/Contents/MacOS/imgshare
Identifier: org.pythonmac.unspecified.imgshare
Version: 0.0.0 (0.0.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: imgshare [3368]
User ID: 501
Date/Time: 2015-08-15 17:22:24.139 -0400
Process: imgshare [3203]
Path: /Users/USER/Downloads/imgshare 5.app/Contents/MacOS/imgshare
Identifier: org.pythonmac.unspecified.imgshare
Version: 0.0.0 (0.0.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: imgshare [3203]
User ID: 501
Date/Time: 2015-08-15 16:49:19.201 -0400
@hvent90
hvent90 / .js
Last active August 29, 2015 14:27
var apiUrl = "https://api.trafficcarma.com/";
var accessToken = "z95kWIdiQDtioJ3bcWzYTx9b4M6EDRasGGVGd6JU"
var marketRouteId = 50;
var marketRouteSegmentIds = getSegmentsOfMarketRoute(marketRouteId);
var segmentIdsToHide = [348];
addRouteToState(marketRouteId, 'market-route');
for (var _i = 0; _i < marketRouteSegmentIds.length; _i++) {
if (! $.inArray(marketRouteSegmentIds[_i], segmentIdsToHide)) {
addRouteToState(marketRouteSegmentIds[_i], 'market-route-segment');
@hvent90
hvent90 / .yaml
Created August 2, 2015 23:53
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
<?php namespace Carma\Events;
use Caster\Models\Incident;
use Caster\Models\IncidentType;
use Caster\Models\IncidentDetail;
class IncidentEventHandler {
/**
* Let's create the incident!
public function subscribe($events)
{
$events->listen('incident.create', 'Carma\Events\IncidentEventHandler@onCreate');
}
public function onCreate(Array $values)
{
return $values;
}
<html>
<head>
<!-- CSS & jQuery for Bootstrap and jQuery -->
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- <link href="css/bootstrap.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'range(
PK_UID CHAR(40) NOT NULL,generatorCollection_ID CHAR(40) NOT NULL, `Field' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "/54.86.92.124:27017" , "ok" : 0.0 , "errmsg" : "can't drop collection with reserved $ character in name"}
at com.mongodb.CommandResult.getException(CommandResult.java:71)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)