Skip to content

Instantly share code, notes, and snippets.

View jshin49's full-sized avatar

Jay S jshin49

View GitHub Profile
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
from __future__ import print_function
import json
import urllib2
def lambda_handler(event, context):
print("Received event: " + json.dumps(event, indent=2))
if 'city' not in event.keys():
return "Please Enter a City"
@jshin49
jshin49 / .bash_aliases
Last active September 27, 2017 09:44
bash commands to control nvidia gpu fan
alias upgrade="sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'"
alias fastgpu="sudo env DISPLAY=:0 nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=100"
alias normalgpu="sudo env DISPLAY=:0 nvidia-settings -a GPUFanControlState=0"
alias mediumgpu="sudo env DISPLAY=:0 nvidia-settings -a GPUFanControlState=1 -a GPUTargetFanSpeed=60"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
@jshin49
jshin49 / aws-openweather.js
Last active August 23, 2016 22:14
Open weather implementation of AWS lambda
'use strict';
let http = require('http');
/**
* Pass the data to send as `event.data`, and the request options as
* `event.options`. For more information see the HTTPS module documentation
* at https://nodejs.org/api/https.html.
*
* Will succeed with the response body.
*/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Tribute to Nelson Mandela</title>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>