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
<!-- HEADLESSUI DROPDOWN THOUGHT EXPERIMENT FOR A JS-ONLY CORE LIB --> | |
<div data-headlessui-dropdown> | |
<button class="..." type="button" data-headlessui-dropdown-toggle> | |
Dropdown button | |
</button> | |
<ul data-headlessui-dropdown-menu> | |
<li><a class="..." href="#">Action</a></li> | |
<li><a class="..." href="#">Another action</a></li> | |
<li><a class="..." href="#">Something else here</a></li> |
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
:root { | |
--blue-100:#cfe2ff; | |
--blue-200:#9ec5fe; | |
--blue-300:#6ea8fe; | |
--blue-400:#3d8bfd; | |
--blue-500:#0d6efd; | |
--blue-600:#0a58ca; | |
--blue-700:#084298; | |
--blue-800:#052c65; | |
--blue-900:#031633; |
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
rails s 08:49:35 | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM | |
/Users/bijan/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here | |
/Users/bijan/.rbenv/versions/2.5.1/lib/rub |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
name: 'Bijan' | |
}); |
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
// There seem to be problems with "climatically" and "fezzes" as passwords. | |
// When using "climatically": Program terminates with "openpgp: unsupported feature: public key version" | |
// When using "fezzes": Program terminates with "openpgp: invalid data: tag byte does not have MSB set" | |
// Expected behaviour would be a reinvokation of the prompt function in an endless loop until the right password is used. | |
package main | |
import ( | |
"bytes" | |
"errors" |
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
func getHexFromColor(color: NSColor) -> NSString { | |
// Get the red, green, and blue components of the color | |
var r :CGFloat = 0 | |
var g: CGFloat = 0 | |
var b: CGFloat = 0 | |
var a: CGFloat = 0 | |
var rInt, gInt, bInt, aInt: Int | |
var rHex, gHex, bHex: NSString |
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
func UploadHandler(w http.ResponseWriter, r *http.Request) { | |
file, _, err := r.FormFile("file") | |
if err != nil { | |
log.Println(err) | |
http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest) | |
return | |
} | |
img, _, err := image.Decode(file) |
NewerOlder