View prepare-commit-msg
This file contains 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
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# Skips this step if the commit message already starts with "[". | |
# Modified from the stackoverflow answer here: http://stackoverflow.com/a/11524807/151445 | |
# | |
# Succeed on all merge messages, as evidenced by MERGE_MSG existing | |
[ -f $GIT_DIR/MERGE_MSG ] && exit 0 |
View main.dart
This file contains 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
import 'package:flutter/cupertino.dart'; | |
void main() { | |
runApp(CupertinoApp( | |
home: MyAppHome(), // becomes the route named '/' | |
routes: <String, WidgetBuilder>{ | |
'/a': (BuildContext context) => const MyPage(title: 'page A'), | |
'/b': (BuildContext context) => const MyPage(title: 'page B'), | |
'/c': (BuildContext context) => const MyPage(title: 'page C'), | |
}, |
View gist:6c930286b67c58b0d1bd8240ca8cab50
This file contains 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
GET /subscription/fail HTTP/1.1 | |
Host: aa062f5____.ngrok.io | |
Upgrade-Insecure-Requests: 1 | |
DNT: 1 | |
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.68 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 | |
Sec-Fetch-Site: cross-site | |
Sec-Fetch-Mode: navigate | |
Sec-Fetch-Dest: document | |
Referer: https://securepay.tinkoff.ru/ |
View controllers.application\.js
This file contains 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
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
View components.simple-drag\.js
This file contains 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
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class SimpleDrag extends Component { | |
@tracked statusText = ""; | |
@tracked overDropZone = false; | |
@action dragHasStarted() { |
View index.html
This file contains 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> | |
<head> | |
<style> | |
.container { | |
width: 100%; | |
height: 100vh; | |
display: flex; | |
flex-wrap: wrap; |
View assign_in_container.cpp
This file contains 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
#include <iostream> | |
#include <string> | |
#include <utility> | |
#include <future> | |
#include <mutex> | |
#include <random> | |
#include <thread> | |
#include <chrono> | |
#include <sstream> |
View properties.swift
This file contains 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
import Foundation | |
class MyClass { | |
private let name: String | |
init(name: String) { | |
self.name = name | |
} | |
// Pure computed property, cannot be set. Behaves like a constant field for the user of the class | |
var computed: String { |
View class-vs-struct.swift
This file contains 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
class MyClass { | |
var name: String | |
init(name: String) { | |
self.name = name | |
} | |
} | |
var mc1 = MyClass(name: "Name 1") |
View gist:0ac64647d3a55338e65de0839c40132a
This file contains 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
<script> | |
$(document).on('click', '#make_header_red', function() { | |
$('#header').css('font-color', 'red'); | |
}); | |
</script> |
NewerOlder