Skip to content

Instantly share code, notes, and snippets.

lzwjava lzwjava

Block or report user

Report or block lzwjava

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@plantvsbirds
plantvsbirds / feynman-lecture-vol-i.json
Last active Oct 22, 2019
download your copy of epub/mobi of caltech fenman lecture on physics vol i http://www.feynmanlectures.caltech.edu/I_toc.html, powered by https://github.com/lepture/getbook/
View feynman-lecture-vol-i.json
{
"uid": "feynman-lecture-vol-i",
"title": "The Feynman Lectures on Physics, Volume I",
"author": "Richard Feynman",
"chapters": ["http://www.feynmanlectures.caltech.edu/I_89.html","http://www.feynmanlectures.caltech.edu/I_90.html","http://www.feynmanlectures.caltech.edu/I_91.html","http://www.feynmanlectures.caltech.edu/I_92.html","http://www.feynmanlectures.caltech.edu/I_01.html","http://www.feynmanlectures.caltech.edu/I_02.html","http://www.feynmanlectures.caltech.edu/I_03.html","http://www.feynmanlectures.caltech.edu/I_04.html","http://www.feynmanlectures.caltech.edu/I_05.html","http://www.feynmanlectures.caltech.edu/I_06.html","http://www.feynmanlectures.caltech.edu/I_07.html","http://www.feynmanlectures.caltech.edu/I_08.html","http://www.feynmanlectures.caltech.edu/I_09.html","http://www.feynmanlectures.caltech.edu/I_10.html","http://www.feynmanlectures.caltech.edu/I_11.html","http://www.feynmanlectures.caltech.edu/I_12.html","http://www.feynmanlectures.caltech.edu/I_13.html","http://www.feynman
@mabasic
mabasic / helpers.php
Last active Dec 20, 2019
config_path function for Lumen framework
View helpers.php
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@nicklockwood
nicklockwood / gist:21495c2015fd2dda56cf
Last active Oct 18, 2018
Thoughts on Swift 2 Errors
View gist:21495c2015fd2dda56cf

Thoughts on Swift 2 Errors

When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.

So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.

Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?

I'm going to cover three things in this post:

@johnz133
johnz133 / elon_musk_use_commencement_speech_transcript
Last active Aug 20, 2019
Elon Musk USC Commencement Speech Transcript.
View elon_musk_use_commencement_speech_transcript
Alright, thank you.
So, I’ve got about apparently I’ve got about five to six minutes to say the most useful things I can think of.
I’m gonna do my best.
It was suggested that I distill things down to 3 items.
I think I’ll go with four.
And I’ll try, I think, I think these are pretty important ones.
Some of it may kinda sound like, well you’ve heard them before.
But, you know, worth reemphasizing.
I think the first is, you need to work, if you, depending on how well you want to do,
@xfreebird
xfreebird / customsshd
Last active Mar 3, 2016
A script which can be used to start a second SSHD daemon on OS X. This is an workaround for running tests using xcodebuild through ssh with Jenkins .
View customsshd
#!/bin/bash
INSTALL_PATH="$HOME/scripts"
SCRIPT_PATH="$INSTALL_PATH/customsshd"
LAUNCHCTL_PATH="$HOME/Library/LaunchAgents/com.my.customsshd.plist"
SSH_KEYS_INSTALL_PATH=$HOME/customkeys
SSH_HOST_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_key
SSH_HOST_RSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_rsa_key
SSH_HOST_DSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_dsa_key
SSHD_PORT=50111
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Jan 17, 2020
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

You can’t perform that action at this time.