#include <stdlib.h>
int main() {
char* string = malloc(5 * sizeof(char)); //LEAK: not freed!
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 os | |
import fnmatch | |
def get_comment_prefix(filename): | |
extension_to_comment = { | |
'.asm': (';', ';'), | |
'.awk': ('#', '#'), | |
'.c': ('//', '//'), | |
'.clj': (';;', ';;'), | |
'.cpp': ('//', '//'), |
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
""" | |
Combine Text Files Script | |
This script combines all text files in a specified directory and writes their contents to a single text file, | |
with an option to also create a PDF file. | |
How to use: | |
1. Ensure you have the `reportlab` library installed. If not, install it with the following command: | |
pip install reportlab |
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
package main | |
import ( | |
"fmt" | |
"net/url" | |
"github.com/tarekbadrshalaan/anaconda" | |
) | |
func main() { |
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
// ref: http://p.agnihotry.com/post/understanding_the_context_package_in_golang | |
// ref: https://github.com/pagnihotry/golang_samples/blob/master/go_context_sample.go | |
// ref: https://play.golang.org/p/grQAUN3MBlg | |
// ref: https://play.golang.org/p/NQBpTvigNUA | |
package main | |
import ( | |
"context" | |
"fmt" | |
"math/rand" |
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
package main | |
import ( | |
"context" | |
"fmt" | |
httpapi "github.com/ipfs/go-ipfs-http-client" | |
path "github.com/ipfs/interface-go-ipfs-core/path" | |
) |
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
print("Hello World") |