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
yarn install v1.12.3 | |
[1/4] 🔍 Resolving packages... | |
[2/4] 🚚 Fetching packages... | |
[3/4] 🔗 Linking dependencies... | |
warning "@rails/webpacker > [email protected]" has unmet peer dependency "caniuse-lite@^1.0.30000697". | |
warning " > [email protected]" has unmet peer dependency "styled-components@^4.0.0". | |
warning "[email protected]" is missing a bundled dependency "node-pre-gyp". This should be reported to the package maintainer. | |
[4/4] 📃 Building fresh packages... | |
warning Your current version of Yarn is out of date. The latest version is "1.16.0", while you're on "1.12.3". | |
info To upgrade, run the following command: |
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
const path = require('path'); | |
var express = require('express'); | |
var router = express.Router(); | |
const app = express(); | |
var Client = require('oc-client'); | |
var client = new Client({ | |
registries: { serverRendering: 'https://ac-oc-registry-test.herokuapp.com/'}, | |
components: { |
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
//javascript:%28function%28%29%7Bfunction e%28e%2Ct%29%7Bvar n%3Dnew Date%280%29%3Breturn n.setHours%28e%29%2Cn.setMinutes%28t%29%2Cn%7Dfunction t%28e%2Ct%2Cn%29%7Bfunction a%28e%29%7Bvar t%3Breturn Math.floor%28Math.abs%28e%2F60%29%29%2B"%3A"%2B%28%28t%3DMath.floor%28Math.abs%28e%29%2560%29%29<10%3F"0"%2Bt.toString%28%29%3At.toString%28%29%29%7Dvar r%3D0%3Bfor%28i%3D0%3Bi%2B1<e.length%3Bi%2B%3D2%29%7Bvar l%3De%5Bi%5D%3Br%2B%3D%28%28s%3De%5Bi%2B1%5D%29.getTime%28%29-l.getTime%28%29%29%2F6e4%7Dvar o%3D0%3Bfor%28i%3D1%3Bi%2B1<e.length%3Bi%2B%3D2%29%7Bvar s%3De%5Bi%5D%3Bo%2B%3D%28%28l%3De%5Bi%2B1%5D%29.getTime%28%29-s.getTime%28%29%29%2F6e4%7Do<30%26%26%28r-%3D30-o%2Co%3D30%29%3Bvar c%3D450-r%2Cg%3D%28c>0%3F"-"%3A"%2B"%29%2Ba%28c%29%2Cu%3D"Leave at%3A "%2Bnew Date%28t.getTime%28%29%2B6e4%2Ac%29.toLocaleTimeString%28"en-GB"%2C%7Bhour%3A"2-digit"%2Cminute%3A"2-digit"%7D%29%2B" %28"%2Bg%2B"%29"%2Cm%3Dn-c%3Breturn%7BnewBalanceString%3A%28m>-.001%3F""%3A"-"%29%2Ba%28m%29%2CnewClockingsString%3Au%7D%7Dfunction n%28e%2 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.30980393290519714</real> |
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
if #available(iOS 10.0, *) { | |
let content = UNMutableNotificationContent() | |
content.title = "🔧Service is due in 2 Days🔧" | |
content.subtitle = "\(carReg)" | |
content.body = "🚗 \(carReg) service is due on 7th Nov." | |
content.sound = UNNotificationSound.default() | |
content.categoryIdentifier = "io.swifting.notification-request" | |
let defaults = UserDefaults.standard |
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
// prepare json data | |
let mapDict = [ "1":"First", "2":"Second"] | |
let json = [ "title":"ABC" , "dict": mapDict ] as [String : Any] | |
let jsonData = try? JSONSerialization.data(withJSONObject: json, options: .prettyPrinted) | |
// create post request | |
let url = NSURL(string: "https://httpbin.org/post")! | |
let request = NSMutableURLRequest(url: url as URL) | |
request.httpMethod = "POST" |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="networkid" | |
psk="Password" | |
} |
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
enum WeekDayNumber { | |
case Monday, Tuesday, Wednesday, Thursday, Friday, Caturday, Saturday, Sunday | |
static var dayValuesInChinese = [] | |
func getDayInNumber() -> Int { | |
switch self { | |
case .Monday: | |
return 1 | |
case .Tuesday: |
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
SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
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
function lotto() { | |
var winningNumbers = []; | |
while (winningNumbers.length < 6) { | |
console.log('here'); | |
var winner = Math.random() * (60 - 1) + 1 | |
winner = parseInt(winner); | |
if (winningNumbers.length === 0) { | |
winningNumbers.push(winner); |
NewerOlder