NSTimeZone - Timezone Abbreviations ADT = "America/Halifax"; AKDT = "America/Juneau"; AKST = "America/Juneau"; ART = "America/Argentina/Buenos_Aires"; AST = "America/Halifax"; BDT = "Asia/Dhaka"; BRST = "America/Sao_Paulo"; BRT = "America/Sao_Paulo"; BST = "Europe/London";
View watchdog.py
import os | |
import logging | |
from queue import Queue, Empty as EmptyQueue | |
from time import sleep | |
from threading import Thread | |
from typing import List | |
logger = logging.getLogger("watchdog") |
View postgres.sh
#!/bin/bash | |
set -euo pipefail | |
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
openssl req -x509 -in server.req -text -key server.key -out server.crt | |
chmod 600 server.key | |
test $(uname -s) == Linux && chown 70 server.key | |
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key |
View resetXcode.sh
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
open /Applications/Xcode.app |
View Bindable.cs
namespace Helpers | |
{ | |
///<summary> | |
/// Reduce mvvm boilerplate | |
/// | |
/// Usage: | |
/// public class MyViewModel : Bindable { | |
/// // Now this property supports INotifyPropertyChanged | |
/// public string MyProperty | |
/// { |
View upgrade.md
#Phoenix 1.1.x to 1.2.0 Upgrade Instructions
Project Generator
To generate new projects as 1.2.0, install the new mix archive:
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez
Deps
View facts_rules.pl
/* | |
To run this: | |
open command prompt execute 'swipl' | |
then run ['path/to/this/file.pl']. | |
then query away. | |
*/ | |
% FACTS | |
likes(jana, omar). | |
likes(omar, jana). |
View Dockerfile
FROM ubuntu | |
MAINTAINER Maz Jaleel <mazjaleel@gmail.com> | |
# Install necessary tools to build Poco | |
RUN apt-get update && apt-get install -yq \ | |
unzip wget build-essential cmake \ | |
openssl libssl-dev \ | |
unixODBC unixODBC-dev odbc-postgresql |
View hard-reproductions.md
Trouble reproducing a bug? Run this checklist to make sure you're reproducing user's environment as closely as possible:
Device
- iOS version?
- iPad/iPhone?
- CPU architecture?
- Screen size? Orientation? Slide-over/Split View?
iOS settings
View dev.exs
config :my_app, :twitter_api, | |
client: Twitter.SandboxClient |
NewerOlder