{__/} ( • . •) / >❤️
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
/* | |
* get_string.c | |
* | |
* | |
* Read a string from stdin, store it in an array, | |
* and print it back to the user. | |
*/ | |
#include <ctype.h> | |
#include <stdlib.h> |
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
#!/usr/bin/env node | |
// Required parameters: | |
// @raycast.schemaVersion 1 | |
// @raycast.title zxy-generate notion daily titles | |
// @raycast.mode fullOutput | |
// Optional parameters: | |
// @raycast.icon 🤖 |
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
const gulp = require("gulp"); | |
const sourcemaps = require("gulp-sourcemaps"); | |
const ts = require("gulp-typescript"); | |
const tsProject = ts.createProject("tsconfig.json"); | |
const cssInput = "src/**/*.css"; | |
const output = "out"; | |
function typescript(cb) { | |
tsProject |
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
/*/../usr/bin/true | |
source="$0" | |
compiled="$0"c | |
if [[ "$source" -nt "$compiled" ]]; then | |
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcrun swiftc -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -g "$source" -o "$compiled" || exit | |
fi | |
"$compiled" |
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
javascript: (function() { | |
url = 'https://sourcegraph.com/' + location.href.replace(/(^\w+:|^)\/\//, ''); | |
window.open(url, '__blank'); | |
})(); |
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
struct Version { | |
let rawValue: String | |
init(_ string: String) { | |
self.rawValue = string | |
} | |
enum CompareResult { | |
case greaterThan | |
case equal |
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 HDFSClient | |
attr_accessor :prefix_url | |
def initialize(prefix_url) | |
prefix_url.append("/") unless prefix_url.end_with?("/") | |
@prefix_url = prefix_url | |
end | |
def upload(file_name, file_path) | |
system "curl -i -L -s -X PUT -T #{file_path} \ | |
#{@prefix_url}#{file_name}\\?op\\=CREATE" |
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
# 需要检查的 gem 以及对应的版本 | |
requireGems = { | |
'psych' => '>= 2.1', | |
} | |
# cocoapods & psych | |
requireGems.each do |gem_name, gem_ver_reqs| | |
gdep = Gem::Dependency.new(gem_name, *gem_ver_reqs) | |
found_gspec = gdep.matching_specs.max_by(&:version) | |
if found_gspec |
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
/* | |
* is_palindrome.c | |
* | |
* | |
* Read an input from stdin, print it back to the user and | |
* report if it is a palindrome. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
NewerOlder