Skip to content

Instantly share code, notes, and snippets.

View lukfugl's full-sized avatar

Jacob Fugal lukfugl

  • Derivita, Inc.
  • Utah
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>What Time Is It?</title>
<meta charset="utf-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
@lukfugl
lukfugl / files_controller.diff
Created May 4, 2018 18:28
fix avatar upload for local storage
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 082feccdaf..cfbe800d3a 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -764,11 +764,13 @@ class FilesController < ApplicationController
@attachment.uploaded_data = params[:file] || params[:attachment] && params[:attachment][:uploaded_data]
if @attachment.save
# for consistency with the s3 upload client flow, we redirect to the success url here to finish up
+ includes = Array(params[:success_include])
+ includes << 'avatar' if @attachment.folder == @attachment.user&.profile_pics_folder
“The experience of mankind has shown that the people of communities and nations among whom wealth is the most equally distributed, enjoy the largest degree of liberty, are the least exposed to tyranny and oppression and suffer the least from luxurious habits which beget vice. Under such a system, carefully maintained there could be no great aggregations of either real or personal property in the hands of a few; especially so while the laws, forbidding the taking of usury or interest for money or property loaned, continued in force.
One of the great evils with which our own nation is menaced at the present time is the wonderful growth of wealth in the hands of a comparatively few individuals. The very liberties for which our fathers contended so steadfastly and courageously, and which they bequeathed to us as a priceless legacy, are endangered by the monstrous power which this accumulation of wealth gives to a few individuals and a few powerful corporations. By its seductive influence results are accomplished
“The experience of mankind has shown that the people of communities and nations among whom wealth is the most equally distributed, enjoy the largest degree of liberty, are the least exposed to tyranny and oppression and suffer the least from luxurious habits which beget vice. Under such a system, carefully maintained there could be no great aggregations of either real or personal property in the hands of a few; especially so while the laws, forbidding the taking of usury or interest for money or property loaned, continued in force.
One of the great evils with which our own nation is menaced at the present time is the wonderful growth of wealth in the hands of a comparatively few individuals. The very liberties for which our fathers contended so steadfastly and courageously, and which they bequeathed to us as a priceless legacy, are endangered by the monstrous power which this accumulation of wealth gives to a few individuals and a few powerful corporations. By its seductive influence results are accomplished
@lukfugl
lukfugl / .asoundrc
Created January 20, 2011 05:28
alsa config
pcm.!default {
type plug
slave {
pcm "hw:0,0"
rate 48000
}
}
ctl.!default {
type plug
slave {
@lukfugl
lukfugl / lshw.out
Created January 20, 2011 05:07
lshw output
meriadoc
description: Notebook
product: N53Jq
vendor: ASUSTeK Computer Inc.
version: 1.0
serial: AAN0AS70978044
width: 64 bits
capabilities: smbios-2.6 dmi-2.6 vsyscall64 vsyscall32
configuration: boot=normal chassis=notebook uuid=00B270A2-1DE1-DF81-21C1-BCAEC5068B67
*-core
GET /YYYY/MM/DD/HH/layer -- returns label text for slot+layer
GET /YYYY/MM/DD/HH -- returns yaml/json hash of layer:label
GET /YYYY/MM/DD/layer -- returns yaml/json list of labels for the slots+layer
GET /YYYY/MM/DD -- returns yaml/json list of hashes of layer:label
PUT /YYYY/MM/DD/HH/layer -- sets label text for slot+layer (one-time)
PUT /YYYY/MM/DD/HH/layer/recurring -- sets label text for slot+layer (recurring, starting at date)
DELETE /YYYY/MM/DD/HH/layer -- clears label text for slot+layer (one-time)
DELETE /YYYY/MM/DD/HH/layer/recurring -- clears label text for slot+layer (recurring, starting at date)
Note: DELETE /YYYY/MM/DD/HH/layer/recurring doesn't "end" a recurring label that started in a previous week. to do that, PUT /YYYY/MM/DD/HH/layer/recurring for the new date and it will override the recurring event for the old date