😶🌫️
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 <stdio.h> | |
/* | |
X A B | |
--> | |
--> | |
<-- | |
<-- | |
*/ |
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
package com.github.wingyplus.sparktut; /** | |
* Created by wingyplus on 12/15/2015 AD. | |
*/ | |
import java.util.ArrayList; | |
import java.util.List; | |
public class MainApp { |
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 jenkins.model.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import hudson.plugins.sshslaves.*; | |
domain = Domain.global() | |
store = Jenkins.instance.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')[0].getStore() |
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
"use strict"; | |
class Car { | |
constructor() { | |
this.isStarted = false; | |
} | |
start() { | |
return new Promise((resolve, reject) => { |
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
/* | |
Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
They are error checkers, so use them only when err != nil, and you want to handle | |
specific errors in a different way! | |
Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
"file does not exist/directory does not exist" |
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
"use strict"; | |
function validateUsername(username) { | |
return true; | |
} | |
describe("validateUsername", () => { | |
["abc", "longusername"].forEach((username) => { | |
it(`should valid for username ${username}`, () => { | |
expect(validateUsername(username)).toBeTruthy(); |
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
"use strict"; | |
let http = require("http"); | |
let url = require("url"); | |
const STATUS_NOT_FOUND = 404; | |
let handlerMap = {}; | |
module.exports = { |
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
public class Main { | |
public static void main(String ... args) { | |
System.out.println(Integer.valueOf(100) == Integer.valueOf(100)); // true | |
System.out.println(Integer.valueOf("100") == Integer.valueOf(100)); // true | |
System.out.println(Integer.valueOf("100") == Integer.valueOf(100)); // true | |
System.out.println(Integer.valueOf(1000) == Integer.valueOf(1000)); // false | |
System.out.println(Integer.valueOf("1000") == Integer.valueOf(1000)); // false | |
System.out.println(Integer.valueOf(1000).equals(Integer.valueOf(1000))); // true | |
} |
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 | |
fetch_jenkins_cli() { | |
wget http://127.0.0.1:8080/jnlpJars/jenkins-cli.jar -O jenkins-cli.jar | |
} | |
install_jenkins() { | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
echo 'deb http://pkg.jenkins-ci.org/debian binary/' > /etc/apt/sources.list.d/jenkins.list | |
apt-get update && apt-get install -y jenkins |
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 java.util.*; | |
import javax.mail.*; | |
import javax.mail.internet.*; | |
public class Main { | |
private static String USER_NAME = "*****"; // GMail user name (just the part before "@gmail.com") | |
private static String PASSWORD = "********"; // GMail password | |
private static String RECIPIENT = "lizard.bill@myschool.edu"; |