Skip to content

Instantly share code, notes, and snippets.

View oscarcarlsson's full-sized avatar

Oscar Carlsson oscarcarlsson

View GitHub Profile
@oscarcarlsson
oscarcarlsson / gist:1275628
Created October 10, 2011 15:36
biblatex i auctex
(setq reftex-cite-format '((13 . "\\cite[]{%l}")
(116 . "\\textcite[]{%l}")
(112 . "\\parencite[]{%l}")
(97 . "\\citeauthor{%l}")
(110 . "\\nocite{%l}")))
(unless (package-installed-p 'gist)
(package-install 'gist))
;; Visa gist när den är klar!
(setq gist-view-gist t)
public function compose()
{
function filter_empty($item) {
return (! trim($item) == "");
}
$this->load->helper(array('form', 'url', 'MY_form_helper'));
$this->load->library('form_validation');
$this->form_validation->set_error_delimiters('<div class="alert-message error">
Delivered-To: foo.bar@gmail.com
Received: by 10.182.103.2 with SMTP id fs2csp32821obb;
Mon, 13 May 2013 11:17:57 -0700 (PDT)
Return-Path: <3VC6RUQcLDocyz2p0w99z545mp.nzxz3nl2.nl2w33zyrxltw.nzx@youtube-subscriptions.bounces.google.com>
Received-SPF: pass (google.com: domain of 3VC6RUQcLDocyz2p0w99z545mp.nzxz3nl2.nl2w33zyrxltw.nzx@youtube-subscriptions.bounces.google.com designates 10.50.183.164 as permitted sender) client-ip=10.50.183.164
Authentication-Results: mr.google.com;
spf=pass (google.com: domain of 3VC6RUQcLDocyz2p0w99z545mp.nzxz3nl2.nl2w33zyrxltw.nzx@youtube-subscriptions.bounces.google.com designates 10.50.183.164 as permitted sender) smtp.mail=3VC6RUQcLDocyz2p0w99z545mp.nzxz3nl2.nl2w33zyrxltw.nzx@youtube-subscriptions.bounces.google.com;
dkim=pass header.i=@youtube.com
X-Received: from mr.google.com ([10.50.183.164])
by 10.50.183.164 with SMTP id en4mr18680424igc.2.1368469077037 (num_hops = 1);
LaTeX Warning: You have requested, on input line 53, version
`2016/03/28' of package expl3,
but only version
`2016/03/26 v6466 L3 programming layer (loader) '
is available.
C:/Users/oscar/Local/MiKTeX 2.9/tex/latex/l3packages/xparse/xparse.sty:65: Package xparse Error: Support package l3kernel too old.
@oscarcarlsson
oscarcarlsson / compile-nginx.sh
Created February 7, 2017 10:10 — forked from Zewy/compile-nginx.sh
Compile Nginx with OpenSSL on CentOS 7 to support ALPN (and therefore HTTP/2) and ngx_pagespeed
#!/bin/bash
## Software versions (you can edit this if there are newer versions)
#NPS_VERSION="1.12.34.2" # 2016-12-15 (Beta)
NPS_VERSION="1.11.33.4" # 2016-10-03 (Stable)
NGINX_VERSION="1.11.9" # 2017-01-24 (mainline)
OPENSSL_VERSION="1.1.0d" # 2017-01-26 (stable)
PCRE_VERSION="8.39" # 2016-06-14 (old stable, latest supported by Nginx)
ZLIB_VERSION="1.2.11" # 2017-01-15 (stable)
const [missed, total] = missedRaw.split(" of ").forEach(function (part) {
return part.replace(',', '');
});
// input 1,000 of 2,000
// goal is to have missed = 1000, total = 2000
const [missed, total] = missedRaw.split(" of ").forEach(function (part) {
return part.replace(',', '');
});
-- Autostart applications *once* at startup
autorun = true
autorun_apps =
{
-- cmd is required, the rest is optional.
{ cmd="nm-applet", },
-- Args are supported as well.
{ cmd="xrdb", args="~/.Xdefaults"},
@oscarcarlsson
oscarcarlsson / configuration.nix
Created April 9, 2019 13:08 — forked from LnL7/configuration.nix
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{