A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
Temp/ | |
Library/ | |
obj/ | |
*.svd | |
!Library/*.asset | |
!Library/AssetImportState | |
!Library/AssetVersioning.db | |
!Library/BuildPlayer.prefs | |
!Library/ScriptMapper |
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
#include <stdio.h> | |
#include <stdbool.h> | |
#include <sys/time.h> | |
typedef struct _profile_buf { | |
const char *title; | |
unsigned long long total; | |
unsigned long long index; | |
struct timeval timestamp; | |
} profile_buf; |
******************************************************** | |
*** STEPS TO SYMBOLIZE A CRASH DUMP OR EXCEPTION LOG *** | |
******************************************************** | |
1) Move/copy both the crashing .app and the relevant.dSYM files into the same directory. | |
2) If the crash was in a framework, dynamic library, or bundle, you have position-independent code and must work out the *slide*. Otherwise, skip up to step 9 and use slide=0. | |
3a) If you have a crash dump, look in the *Binary Images* part of the crash log and find the framework, dynamic libray or bundle in which the crash occurred. Read the first column of the output. This is the address at which the __TEXT segment was loaded. We call it the *Actual Load Address* and denote it as *A*. |
// Start repl with: | |
// $ xcrun swift -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks | |
// Or run as script: | |
// $ xcrun swift -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks % | |
import Foundation | |
if dlopen("/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest", RTLD_NOW) == nil { |
import Cocoa | |
import CoreGraphics | |
extension NSScreen { | |
var displayID: CGDirectDisplayID { | |
return deviceDescription["NSScreenNumber"] as? CGDirectDisplayID ?? 0 | |
} | |
} |
func jpegDataFrom(image:NSImage) -> Data { | |
let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil)! | |
let bitmapRep = NSBitmapImageRep(cgImage: cgImage) | |
let jpegData = bitmapRep.representation(using: NSBitmapImageRep.FileType.jpeg, properties: [:])! | |
return jpegData | |
} |
#!/usr/bin/env python | |
# Written by Shivasiddharth a.k.a Sid | |
# Youtube channel https://www.youtube.com/c/SidsEClassroom | |
# Share this script without removing the author's name | |
# This piece of script Upscales or Downscales videos using Opencv | |
# If the original video has an audio stream, | |
# it will merge the audio from the source file with the scaled video |
I wrote this gist because I felt that the Rails documentation was lacking a description of ajax requests.
There are various ways to send ajax requests in Rails.
Rails.ajax
(No Official docs and request for docs)