This file contains hidden or 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
| ;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*- | |
| ;; Copyright (c) 2025 Nicolas P. Rougier | |
| ;; Released under the GNU General Public License 3.0 | |
| ;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr> | |
| ;; URL: https://github.com/rougier/nano-emacs | |
| ;; This is NANO Emacs in 256 lines, without any dependency | |
| ;; Usage (command line): emacs -Q -l nano.el -[light|dark] |
This configuration worked for me, hope it helps
It is based on: https://becominghuman.ai/deep-learning-gaming-build-with-nvidia-titan-xp-and-macbook-pro-with-thunderbolt2-5ceee7167f8b
and on: https://stackoverflow.com/questions/44744737/tensorflow-mac-os-gpu-support
This file contains hidden or 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
| @implementation SDImageCache | |
| ... | |
| + (void)changeDefaultCacheDiskToDocument | |
| { | |
| Method origMethod = class_getInstanceMethod(self, @selector(initWithNamespace:)); | |
| Method replaceMethod = class_getInstanceMethod(self, @selector(initWithNamespaceInDocument:)); | |
| if (origMethod && replaceMethod) { | |
| method_exchangeImplementations(origMethod, replaceMethod); | |
| } | |
| } |
This gist is deprecated in favor of https://github.com/ninenines/cowboy/blob/master/doc/src/guide/specs.asciidoc which has a formatted version at https://ninenines.eu/docs/en/cowboy/2.0/guide/specs/
This file contains hidden or 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
| require 'mailchimp' | |
| mailchimp = Mailchimp::API.new(ENV['mailchimp_api_key']) | |
| mailchimp.lists.subscribe(ENV['mailchimp_list_id'], | |
| { email: 'test@example.com' }, | |
| { 'FNAME' => 'First Name', 'LNAME' => 'Last Name' }, | |
| 'html', | |
| false) | |
| # So the format is: | |
| # mailchimp.lists.subscribe(list_id, { email: address }, { merge_vars }, 'email type', double_optin_boolean) |
This file contains hidden or 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
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| require 'aws-sdk' | |
| require 'mail' | |
| # The filename for using it during the script and the location | |
| filename = "#{Time.now.to_s.split(" ").first}_data_only_dump.sql" | |
| store_location = "/home/your_user/your_backups/#{filename}" | |
| # Local backup of a postgres database | |
| `pg_dump -U your_user your_db_name -f #{store_location} --data-only` |
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
NewerOlder