A list of code blocks from many languages to, for example, test a custom theme and see how it renders the code for each language.
#!/bin/bash
#/bin/bash | |
shopt -s nullglob | |
downloadFromFile(){ | |
while read -r URL <&3; do | |
wget --content-disposition $(echo $URL | tr -d '\r') -P "$1/" | |
done 3<"$2" | |
} |
function acp() { | |
git add . | |
git commit -m "$*" | |
git push origin master | |
} |
# https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emset-urlem | |
git remote set-url --add --push origin git@github.com:Foo/bar.git | |
git remote set-url --add --push origin git@gitlab.com:Foo/bar.git |
import requests | |
from bs4 import BeautifulSoup | |
import time | |
import pandas as pd | |
import random | |
from urllib.parse import urlsplit | |
headers = requests.utils.default_headers() | |
headers.update( |
import requests | |
from bs4 import BeautifulSoup | |
import time | |
import pandas as pd | |
import random | |
from urllib.parse import urlsplit | |
stories_cols = ['title', 'story'] | |
csv_stories = pd.DataFrame(columns=stories_cols) |
# EditorConfig is awesome: http://EditorConfig.org | |
# https://github.com/jokeyrhyme/standard-editorconfig | |
# top-most EditorConfig file | |
root = true | |
# defaults | |
[*] | |
charset = utf-8 |
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
// Max number of candidates | |
#define MAX 9 | |
// Candidates have name and vote count | |
typedef struct | |
{ |
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main(int argc, string argv[]) | |
{ | |
// the user must provide one and only argument | |
if (argc != 2) | |
{ |
#include "helpers.h" | |
#include <stdio.h> | |
#include <math.h> | |
// Convert image to grayscale | |
void grayscale(int height, int width, RGBTRIPLE image[height][width]) | |
{ | |
for (int i = 0; i < height; i++) | |
{ | |
for (int j = 0; j < width; j++) |