Example:
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
diff --git a/src/gui/configure.json b/src/gui/configure.json | |
index 0202f17b21..c095859ca6 100644 | |
--- a/src/gui/configure.json | |
+++ b/src/gui/configure.json | |
@@ -302,8 +302,9 @@ | |
"hb_buffer_destroy(buffer);" | |
] | |
}, | |
- "headers": "harfbuzz/hb.h", | |
+ "headers": "hb.h", |
With Rails 3.0 released a few weeks ago I've migrated a few apps and I'm constantly finding useful new improvements. One such improvement is the ability to log anything in the same way that Rails internally logs ActiveRecord and ActionView. By default Rails 3 logs look slightly spiffier than those produced by Rails 2.3: (notice the second line has been cleaned up)
Started GET "/" for 127.0.0.1 at Mon Sep 06 01:07:11 -0400 2010
Processing by HomeController#index as HTML
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
CACHE (0.0ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
Rendered layouts/_nav.html.erb (363.4ms)
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
function relativeHash(newUrl); | |
const currentUrl = new URL("http://somesite.com/index.html#/page/a"); // or just document.location | |
const newPath = new URL("../blog/b", `http://example.com${currentUrl.hash.slice(1)}`).pathname; | |
currentUrl.hash = `#${newPath}`; | |
} |
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
# USAGE: | |
# 1. Save this file to your Desktop (Cmd-S, click Desktop in the left sidebar) | |
# 2. Open Terminal.app (Cmd-space, type "terminal", hit enter) | |
# 3. Type this, exactly: ruby ~/Desktop/created-times.rb | |
# 4. You should see some output about checking directories and how many files were loaded. | |
# 5. A media-.......csv file will appear on your Desktop, which can be loaded with Excel | |
require 'time' | |
extensions = ["jpg", "jpeg", "mov", "heic", "mp4"] |
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 | |
# This wrapper prefers your project's prettier version, and only runs prettier if your project has configured it. | |
# Save this file as `prettier` in your $PATH, or set your editor's prettier plugin to use it as the prettier binary | |
# find the file prettier is trying to prettify | |
file=${BASH_ARGV[0]:="."} | |
# optionally set where the real prettier command can be found |
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
// before async/await | |
cache.oldThrough(cacheKey, function getData(cb) { | |
fetch(appUrl, function(response) { | |
response.text(function(data) { | |
cb(data); | |
}); | |
}); | |
}, function (template) { | |
res.end(template); |
- via XHR
- sends user's cookies
- cross-origin restrictions protect against malicious sites, unless you have bad CORS settings
- via form
- sends user's cookies
- need to protect with csrf token
- or you can prevent form POST entirely with x-requested-with request header check
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
{ | |
"_class": "page", | |
"do_objectID": "E3FF0D84-6B60-4A08-80D9-EDDA368D2198", | |
"booleanOperation": -1, | |
"exportOptions": { | |
"_class": "exportOptions", | |
"exportFormats": [], | |
"includedLayerIds": [], | |
"layerOptions": 0, | |
"shouldTrim": false |
- Get The Unarchiver (compression utility) here: https://theunarchiver.com/
- Opens iTunes for Mac and download the app from the app store
- Open Finder and navigate to Music/iTunes/iTunes Media/Mobile Applications
- Select the application you downloaded, and drag it into The Unarchiver to extract it
- Navigate into the extracted directory, then into Payload, and you should see an app
- Right-click the app and select "Show Package Contents"
- Find the file "Info.plist", right-click it and select "Quick Look"
- Look through the file for CFBundleURLSchemes (it'll be indented)
- Right below that should be , with each URL scheme inside a tag.
NewerOlder