Skip to content

Instantly share code, notes, and snippets.

View rogeruiz's full-sized avatar

Roger Steve Ruiz rogeruiz

View GitHub Profile

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg

Tech talk lite: cloud.gov container networking

       _                 _
      | |               | |
   ___| | ___  _   _  __| |  __ _  _____   __
  / __| |/ _ \| | | |/ _` | / _` |/ _ \ \ / /
 | (__| | (_) | |_| | (_| || (_| | (_) \ V /
  \___|_|\___/ \__,_|\__,_(_)__, |\___/ \_/
                             __/ |

|___/

@rogeruiz
rogeruiz / tiny_letter_mod.php
Created April 5, 2018 17:36 — forked from huzairyworks/tiny_letter_mod.php
TinyLetter embed code
<form action="http://tinyletter.com/mohdhuzairy" method="post" target="popupwindow" onsubmit="window.open('http://tinyletter.com/mohdhuzairy', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true"><p><input type="text" name="emailaddress" value="Masukkan emel anda" onfocus="if (this.value == 'Masukkan emel anda') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Masukkan emel anda';}" /></p><input type="hidden" value="1" name="embed"/><input type="submit" value="Subscribe" /><p>Powered by <a href="http://tinyletter.com"> TinyLetter</a></p></form>
# The Concourse commands here assume that you target your Concourse
# instance with the `fr` name. Modify anything matchin `-t fr` as
# necessary.
# Search through cf-cli commands using an alias
# @usage: wtcf bind
searchCf() {
cf help -a | grep $@
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

#g-devops Presents: Workflows and Separations of Responsibilities for CircleCI

To increase the speed of your software development through faster feedback, shorter reruns, and more efficient use of resources, configure Workflows.

  • CircleCI version 2.0 documentation on Orchestrating Workflows

Disclaimer This talk is about making sure we’re using CircleCI version 2.0 the way it is used at 18F and blessed by the #g-devops folks. Office/Working hours are weekly at 4pm EST on Tuesdays. The next meeting is March 6th, 2018.

@rogeruiz
rogeruiz / instructions.md
Last active February 2, 2018 17:14
getting an interactive Django console from within a CF python-buildpack

Getting an interactive Django console from within a CF python-buildpack

  1. cf ssh into a running application
    • Once in your running application, find the dependencies that were used for running your Python application. They should be in a directory marked deps/.
  2. Export the $LD_LIBRARY_PATH to include the lib/ directory found in the deps/ directory. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/vcap/deps/0/lib.
  3. Change directories into your Django app and run python manage.py shell

Using GPG to encrypt messages now that Fugacious is Toast

           _               _____ ______ _____   _                                           _
          (_)             |  __ \| ___ \  __ \ | |                                         | |
 _   _ ___ _ _ __   __ _  | |  \/| |_/ / |  \/ | |_ ___     ___ _ __   ___ _ __ _   _ _ __ | |_
| | | / __| | '_ \ / _` | | | __ |  __/| | __  | __/ _ \   / _ \ '_ \ / __| '__| | | | '_ \| __|
| |_| \__ \ | | | | (_| | | |_\ \| |   | |_\ \ | || (_) | |  __/ | | | (__| |  | |_| | |_) | |_
 \__,_|___/_|_| |_|\__, |  \____/\_|    \____/  \__\___/   \___|_| |_|\___|_|   \__, | .__/ \__|
                    __/ |                                                        __/ | |
                   |___/                                                        |___/|_|
@rogeruiz
rogeruiz / building-a-time-tracking-tool-in-rust.markdown
Last active February 7, 2018 02:22
18F Tech Talk 2017. Building a time-tracking tool in Rust

Building a time-tracking tool in Rust

 _____     _ _   _ _
| __  |_ _|_| |_| |_|___ ___    ___
| __ -| | | | | . | |   | . |  | .'|
|_____|___|_|_|___|_|_|_|_  |  |__,|
 _   _               _  |___|        _
| |_|_|_____ ___ ___| |_ ___ ___ ___|_|___ ___
|  _| |     | -_|___| '_| -_| -_| . | |   | . |
|_| |_|_|_|_|___|   |_,_|___|___|  _|_|_|_|_  |
@rogeruiz
rogeruiz / create_ram_disk_macos.sh
Last active April 13, 2018 01:58
Create ram disks in macOS. [source]: https://superuser.com/a/272148
#!/bin/bash
ramfs_size_mb=1024
mount_point=~/volatile
ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512))
ramdisk_dev=`hdid -nomount ram://${ramfs_size_sectors}`
newfs_hfs -v 'Volatile' ${ramdisk_dev}
mkdir -p ${mount_point}
mount -o noatime -t hfs ${ramdisk_dev} ${mount_point}