This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module YourAPIClient exposing (Config, otherFunctions) | |
import Http | |
import Json.Decode as Decode | |
import Json.Encode as Encode | |
-- Config | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while getopts v OPTION ; | |
do | |
case "$OPTION" in | |
v) VERBOSE=true ; shift ;; | |
esac | |
done | |
urls=$(grep -i -E -o 'https?://[^ )]*[^), ]' $1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gfx and glium are Rust libraries that aim to provide a "rusty" abstraction over graphics programming APIs. | |
Both may look similar, and one of the questions that gets asked frequently on IRC is "what are the differences between gfx and glium?". Here is a comparison table: | |
| Gfx | Glium | |
-------------------------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------- | |
URL | <https://github.com/gfx-rs/gfx-rs> | <https://github.com/tomaka/glium> | |
History | Papers since Oct 2013. Really started in June 2014. | Private/confidential from Feb 201 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(macro_rules)] | |
/// MIT license etc. etc. | |
/// | |
/// Experimenting with Python-like list comprehensions. | |
/// | |
/// An attempt to explore the possibility space for ergonomic improvements | |
/// in Rust that can come post v1.0. Notice that there are not type declerations. | |
/// Aside from the "c!" macro invocation, Rust allows for an exact copy of the | |
/// Python comprehension syntax. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
XEN=xen-4.1-amd64 | |
KERNEL=vmlinuz.coreos.xen | |
INITRD=coreos_developer_pxe_image.cpio.gz | |
COREOS_ARGS="root=squashfs: state=tmpfs:" | |
XEN_ARGS="console=hvc0 earlyprintk=xen" | |
CPU=host | |
# Qemu can't deal with gzip'd kernels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a sample of how I am currently dealing with users. | |
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states | |
### | |
# How to create password hashes | |
### | |
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')" | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |