Skip to content

Instantly share code, notes, and snippets.

View rudvfaden's full-sized avatar

Rud Faden rudvfaden

View GitHub Profile
@rudvfaden
rudvfaden / scopes.txt
Last active August 29, 2015 14:06 — forked from iambibhas/scopes.txt
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@rudvfaden
rudvfaden / enviroment-w-comment.sublime-snippet
Created September 16, 2014 19:35
Sublime snippet for LaTeX environments with matching and self adjusting comment
<snippet>
<content><![CDATA[
%========== ${1/(.+)/\U\1/g}: ${2:Description} ==========%
\begin{${1:Environment}}
$3
\end{${1:Environment}}
%=============${1/./=/g}=${2/./=/g}============%
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cenv</tabTrigger>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@rudvfaden
rudvfaden / .gitignore
Last active August 29, 2015 14:17 — forked from kogakure/.gitignore
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@rudvfaden
rudvfaden / latex-exclude-sublime-project
Last active August 29, 2015 14:17
exclude files for latex in sublime project
"file_exclude_patterns":
[
"*.aux",
"*.glo",
"*.idx",
"*.log",
"*.toc",
"*.ist",
"*.acn",
"*.acr",
@rudvfaden
rudvfaden / sublime-latex-project
Created April 6, 2015 07:48
sublime latex project folder
{
"folders":
[
{ "follow_symlinks": true,
"name": "Root",
"path": "Main",
"file_exclude_patterns":
[
"*.acn",
"*.acr",
@rudvfaden
rudvfaden / Side Bar.sublime-menu
Created May 22, 2015 09:17
sidebar menu elementary os
[
{"id": "side-bar-files-open-with",
"children":
[
//application 1
{
"caption": "Chome",
"id": "side-bar-files-open-with-chrome",
@rudvfaden
rudvfaden / cprTilDatoOgAlder.sas
Created August 26, 2015 18:51
Calculate birthday from Danish cpr number
/*
COMMENT: [Makroen beregner fødselsdag ud fra CPR-nummer]
PARAMETERS: [InputDS: Inputdataset
,OutputDS: Outputdataset
,CPRKolonne: Kolonne i InputDS, som indeholder det CPR-nummer der skal beregnes på
,FoedselsdatoKolonne: navnet på den kolonne der skal indeholde fødselsdatoen (Kolonnen er en SASdato med formatet date9.).
]
EXAMPLE: [%BeregnFodselsdatoFraCPR(InputDS=test,OutputDS=test2,CPRKolonne=CPR,FoedselsdatoKolonne=dag);]
VARIABLE: [Makroen returnerer datasettet &OutputDS., som er lig &InputDS. tilføjet kolonnen &FoedselsdatoKolonne.]
HISTORY: [
@rudvfaden
rudvfaden / ExtractFilenameFromFiles.sas
Last active June 3, 2021 10:25
Finds filenames in a given folder using linux pipe for faster execution
%let target_folder=/sasfolders/data/IBprojekt/HRSTAT/produktion/programmer/krl/;
*makes it indifferent wheter or not you add / to the end of the string;
%let target_folder=%tslit(%sysfunc(tranwrd(%sysfunc(cats(&target_folder,/)),//,/)));
filename pipedir PIPE
"ls -la --time-style=full-iso &target_folder.*.* | grep '^-'" encoding='utf-8';
DATA _sm_filenames;
length filsti $1000 filnavn $100 navn $100 bytes 6. filDato 8.;
@rudvfaden
rudvfaden / DimDate.sas
Last active July 13, 2021 12:30
Create date dimension table
%let _output=DimDato;
proc datasets lib=work nolist;
delete &_output;
run;
data workspde.&_output;
length
DatoKey 8
dato 8