Skip to content

Instantly share code, notes, and snippets.

View high5's full-sized avatar
🎯
Focusing

Hiroki K high5

🎯
Focusing
View GitHub Profile
@azu
azu / README.md
Last active March 15, 2024 09:59
スタートアップ/企業の調べ方
@dastergon
dastergon / ec2_info_retriever.py
Last active May 29, 2024 05:17
A basic boto3 based tool for retrieving information from running EC2 instances.
from collections import defaultdict
import boto3
"""
A tool for retrieving basic information from the running EC2 instances.
"""
# Connect to EC2
ec2 = boto3.resource('ec2')
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
@camoles
camoles / vhosts.go
Last active September 23, 2017 03:41 — forked from JalfResi/revprox.go
Virtual Hosts in Go
package main
import(
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
vhost1, err := url.Parse("http://127.0.0.1:1980")
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 18, 2024 15:09
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@sl-digital
sl-digital / Amazon-Linux-AMI PHP55
Last active May 24, 2021 11:03
Install Apache, MySQL and PHP 5.5 on Amazon Linux AMI
:: UPDATE YUM ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo yum update -y
:: INSTALL WEBSERVER :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
sudo yum install httpd24
sudo service httpd start
sudo chkconfig httpd on
chkconfig --list httpd
@suvozy
suvozy / Setup.md
Last active December 28, 2022 07:43
Setup AWS EC2 and RDS (php5.5, apache2.4, mysql5.5, phpmyadmin)
@insin
insin / contactform.js
Last active January 9, 2024 05:27
React contact form example
/** @jsx React.DOM */
var STATES = [
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI',
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS',
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR',
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
]
var Example = React.createClass({
@akichim21
akichim21 / gist:7749545
Last active December 30, 2015 00:29
CCHttpとJsonでサーバー通信
void GameScene::main {
CCHttpRequest* request = newCCHttpRequest();
request->setUrl("http://sample.com");
request->setRequestType(CCHttpRequest::kHttpGet);
request->setResponseCallback(this, callfuncND_selector(GameScene::onHttpRequestCompleted));
request->setTag("GET sample");
CCHttpClient::getInstance()->send(request);