Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
@josephmilla
josephmilla / Rockerfile
Created July 23, 2019 23:57 — forked from donaldguy/Rockerfile
jordan/rundeck + kindlyops oauth2 proxy with roles
#build us a binary for https://github.com/bitly/oauth2_proxy/pull/277
FROM golang
WORKDIR /go/src/github.com/bitly
RUN git clone https://github.com/kindlyops/oauth2_proxy.git
WORKDIR /go/src/github.com/bitly/oauth2_proxy
RUN git checkout github-teams-tweaks
RUN go get
# include patch from https://github.com/bitly/oauth2_proxy/pull/295
RUN curl https://github.com/donaldguy/oauth2_proxy/commit/8965e6b58a3afd8ad9f0f326f91b25253c88d523.patch | git apply --apply -
RUN go build
@josephmilla
josephmilla / nginx.conf
Created November 21, 2018 18:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@josephmilla
josephmilla / toLowerCase
Created September 20, 2015 18:51
Convert all file extensions to lower-case
find . -name '*.*' -exec sh -c '
a=$(echo "$0" | sed -r "s/([^.]*)\$/\L\1/");
[ "$a" != "$0" ] && mv "$0" "$a" ' {} \;

100 101 102 103 104 105 106 107 108 109 110 111 112 113 116 117 118 119 120 121 122 123 124 127 128 130 133 136 137 138 140 143 144 146 147 151 152 154 155 156 160 161 162 166 167 170 188 190 191 193 195 196 200 202 213 216 218 230 231 234 245 247 253 256 259 260 263 264 270 271 272 278 280 290 291 294 296 297 299 300 305 306 311 314 315 318 324 336 340 341 343 344 346 347 348 350 352 353 355 356 357 361 369 371 374 375 378 380 382 383 386 388 389 392 394 400 401 402 406 408 409 412 414 416 417 422 423 424 429 434 435 436 437 438 439 440 441 442 443 444 445 446 450 452 454 455 457 458 459 460 462 465 466 467 468 469 471 473 474 476 477 478 481 482 483 484 485 486 488 489 490 492 493 494 495 496 497 498 499 501 507 514 516 524 530 531 532 534 536 537 539 540 541 543 544 548 550 551 554 555 556 558 562 567 568 571 572 573 574 575 576 579 580 583 585 587 590 591 594 596 599 604 607 610 612 615 616 617 619 621 623 624 626 627 628 630 632 634 637 639 640 641 642 644 657 661 665 673 674 677 679 681 686 694 696 697

@josephmilla
josephmilla / new_gist_file.md
Created June 25, 2015 01:31
Node.JS Server Setup
$.ajax({
type: "POST",
username: "ACCOUNT_SID",
password: "AUTH_TOKEN",
url: "https://api.twilio.com/2010-04-01/Accounts/[ACCOUNT_SID]/Messages.json",
data: {
"To" : "+911234567890",
"From" : "+11234567890",
"Body" : "From jQuery AJAX"
},
@josephmilla
josephmilla / new_gist_file_0
Created June 16, 2015 19:27
wget website
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
For my purposes I didn't use build dist because there was some confusion retrieving assets and such so I just stuck to development and kept things in the client folder
From there:
Use the FTP client of your choice to upload your angular-fullstack folder to /opt
In the terminal of your choice run: ssh root@your-digital-ocean-ip-address
cd into /opt/name-of-your-fullstack-project-folder
Then run node server/app.js
This will start up your server in development on port 9000.
To keep the server running:
Run these commands in order
@josephmilla
josephmilla / pip_update
Created March 30, 2015 18:04
Updating pip packages
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
import unittest
# ************** To be implemented ***************
# The TimeObject has a constructor that takes a single string
# that will be parsed into components that we need to make a
# guess at what the user meant.
#
# The TimeObject has three properties:
# digits: a string representation of all the digits in the input
# period: 'am' or 'pm'. Can also be None if 24-hour time