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
| from jinja2 import Template | |
| from jinja2.runtime import Context | |
| from jinja2.exceptions import UndefinedError | |
| def merge_vars(obj): | |
| d = {} | |
| for o in reversed(obj.mro()): | |
| d.update(vars(o)) | |
| return d |
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
| py3 pass | |
| syntax on | |
| set background=dark | |
| set laststatus=2 | |
| set smartindent | |
| set autoindent | |
| set modeline | |
| set nocompatible | |
| " execute pathogen#infect() |
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 lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <link rel="icon" href="../../favicon.ico"> |
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
| var module = angular.module('HelloWorldApp', []); | |
| module.controller('HelloWorldController', function($scope){ | |
| $scope.name = ""; | |
| $scope.greeting = "World" | |
| $scope.setName = function(){ | |
| $scope.greeting = $scope.name.toUpperCase(); | |
| }; | |
| }) |
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
| """hellworldproj URL Configuration | |
| The `urlpatterns` list routes URLs to views. For more information please see: | |
| https://docs.djangoproject.com/en/2.0/topics/http/urls/ | |
| Examples: | |
| Function views | |
| 1. Add an import: from my_app import views | |
| 2. Add a URL to urlpatterns: path('', views.home, name='home') | |
| Class-based views | |
| 1. Add an import: from other_app.views import Home |
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
| """ | |
| Django settings for hellworldproj project. | |
| Generated by 'django-admin startproject' using Django 2.0.2. | |
| For more information on this file, see | |
| https://docs.djangoproject.com/en/2.0/topics/settings/ | |
| For the full list of settings and their values, see | |
| https://docs.djangoproject.com/en/2.0/ref/settings/ |
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
| " vim use the first python interpreter that is | |
| " loaded. This force it to load python3 :-) | |
| py3 pass | |
| " fish shell is not posix. This leads to errors | |
| " while VundleInstall. This fix it | |
| set shell=bash | |
| syntax on | |
| set background=dark |
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
| const vm = require('vm'); | |
| var data = []; | |
| process.stdin.setEncoding('utf8'); | |
| process.stdin.on('readable', () => { | |
| const chunk = process.stdin.read(); | |
| if (chunk !== null) { | |
| data.push(chunk); | |
| } | |
| }); | |
| process.stdin.on('end', () => { |
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
| const foo = new Promise((resolve,reject) => { | |
| const failed = Math.random() > 0.5; | |
| setTimeout(data => { | |
| if (failed) { | |
| reject(data); | |
| } else { | |
| resolve(data); | |
| } | |
| }) | |
| }); |
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
| ➜ ~ gdbus call -y -d org.freedesktop.systemd1 -o /org/freedesktop/systemd1 -m org.freedesktop.systemd1.Manager.ListUnitsFiltered task | |
| Error parsing parameter 1 of type 'as': unknown keyword: | |
| task | |
| ^^^^ |