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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Clustered Mapbox Map</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.mapbox.com/mapbox-gl-js/v2.8.2/mapbox-gl.js'></script> | |
<script src="https://unpkg.com/[email protected]/dist/supercluster.min.js"></script> | |
<link href='https://api.mapbox.com/mapbox-gl-js/v2.8.2/mapbox-gl.css' rel='stylesheet' /> | |
<style> |
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
import flask | |
import os | |
import psycopg2 | |
import geojson | |
from dotenv import load_dotenv | |
from flask_cors import CORS | |
load_dotenv() | |
DB_NAME = os.getenv("DB_NAME") |
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
#include <errno.h> | |
#include <fcntl.h> | |
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <strings.h> | |
#include <sys/poll.h> | |
#include <sys/socket.h> | |
#include <unistd.h> |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <netinet/in.h> | |
#include <sys/socket.h> | |
#include <sys/epoll.h> | |
#define PORT 8080 | |
#define MAX_EVENTS 256 |
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
local set = vim.opt | |
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' | |
if not vim.loop.fs_stat(lazypath) then | |
vim.fn.system { | |
'git', | |
'clone', | |
'--filter=blob:none', | |
'https://github.com/folke/lazy.nvim.git', | |
'--branch=stable', |
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
// build.rs | |
use std::env; | |
use std::fs; | |
use std::path::Path; | |
fn main() { | |
let out_dir = env::var("OUT_DIR").unwrap(); | |
let dest_path = Path::new(&out_dir).join("routes.rs"); | |
let src_path = Path::new("src/pages"); |
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
#!/bin/bash | |
# USAGE | |
# ./aoc_get_input [day_number] >> input.txt | |
SESSION="session=?????" | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied" |
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
use std::thread::spawn; | |
fn main() { | |
let mut threads = vec![]; | |
let my_array: &'static [u8; 16] = Box::leak(Box::new([0; 16])); | |
for i in 0..4 { | |
let thread = spawn(move || { | |
let my_array = my_array.as_ptr() as *mut u8; | |
unsafe { |
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
#!/bin/bash | |
DOOM=$(date -d "30 Oct 22" +%s) | |
NOW=$(date +%s) | |
if [[ $NOW -gt $DOOM ]]; then | |
echo "WORKS" | |
fi |
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
local global = vim.g | |
local option = vim.o | |
local set = vim.opt | |
local map = vim.api.nvim_set_keymap | |
-- Set conceallevel = 0 | |
vim.api.nvim_exec("autocmd BufEnter *.json set conceallevel=0", false) | |
vim.api.nvim_exec("autocmd BufEnter *.json set concealcursor=n", false) | |
-- Tabs Settings |
NewerOlder