Skip to content

Instantly share code, notes, and snippets.

View leetheguy's full-sized avatar

Lee Nathan leetheguy

View GitHub Profile
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@Miserlou
Miserlou / cities.json
Created April 30, 2015 06:58
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
import { Component } from '@stencil/core';
@Component({
tag: 'clock-face'
})
export class ClockFace {
render() {
return (
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
import { Component, Prop } from '@stencil/core';
@Component({
tag: 'clock-face'
})
export class ClockFace {
@Prop() hour: number;
@Prop() minute: number;
@Prop() second: number;
import { Component } from '@stencil/core';
@Component({
tag: 'analog-clock',
})
export class AnalogClock {
get hour(): number {
let h: any = new Date().getHours();
return h;
}
import { Component, State } from '@stencil/core';
@Component({
tag: 'analog-clock',
})
export class AnalogClock {
timer: number;
@State() time: number = Date.now();
import { Component } from '@stencil/core';
@Component({
tag: 'analog-clock',
})
export class AnalogClock {
render() {
return [
<div>
<clock-face/>
import { Component, Prop, Event, EventEmitter } from '@stencil/core';
import '@ionic/core';
@Component({
tag: 'time-zone-slider'
})
export class TimeZoneSlider {
@Prop() offset: number;
@Event() timeZoneChanged: EventEmitter;
import { Component, State, Listen } from '@stencil/core';
@Component({
tag: 'analog-clock',
})
export class AnalogClock {
timer: number;
@State() time: number = Date.now();
@State() timeZone: number = 0;
@jlia0
jlia0 / agent loop
Last active July 3, 2026 03:00
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet