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 main | |
import ( | |
"fmt" | |
"testing" | |
) | |
func readonly() {} | |
var readwrite = func() {} |
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> | |
struct Base { | |
}; | |
struct D1 : Base { | |
}; | |
struct D2 : Base { | |
int a{10}; |
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
#!/usr/bin/env bash | |
# Usage: salt-encrypt {optional -f} <input> <keyid>, or just `salt-encrypt` for interactive mode | |
# Summary: Encrypt some string / file for Salt | |
# Help: This command can be used to gpg encrypt some content for use in salt pillars or really anything you want to encrypt with GPG | |
set -e | |
#Replace below with the default key you encrypt with | |
DEFAULT_RECIPIENT="XXXXXX" | |
multi=0 |
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
# | |
# Find the JEMALLOC client includes and library | |
# | |
# This module defines | |
# JEMALLOC_INCLUDE_DIR, where to find jemalloc.h | |
# JEMALLOC_LIBRARIES, the libraries to link against | |
# JEMALLOC_FOUND, if false, you cannot build anything that requires JEMALLOC | |
# also defined, but not for general use are |
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/bash | |
host=http://localhost:8080 | |
url=/pluginManager/installNecessaryPlugins | |
# git plugin https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin | |
curl -X POST -d '<jenkins><install plugin="git@2.0" /></jenkins>' --header 'Content-Type: text/xml' $host$url | |
# artifactory plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin | |
curl -X POST -d '<jenkins><install plugin="artifactory@2.2.1" /></jenkins>' --header 'Content-Type: text/xml' $host$url |
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 main | |
import ( | |
"fmt" | |
"errors" | |
) | |
type Maybe interface { | |
Return(value interface{}) Maybe | |
Bind(func(interface{}) Maybe) Maybe |
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
type Whatever struct { | |
someField int | |
} | |
func (w Whatever) MarshalJSON() ([]byte, error) { | |
return json.Marshal(struct{ | |
SomeField int `json:"some_field"` | |
}{ | |
SomeField: w.someField, | |
}) |
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
/** | |
* Created by bing at 2019-12-17 08:58 | |
*/ | |
package rscrawler | |
import ( | |
"github.com/anaskhan96/soup" | |
"io/ioutil" | |
"log" | |
"net/http" |
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
#!/usr/bin/env bash | |
#Check Files in list from file exist or doesn't exist in directory. | |
if [ $# -eq 0 ] || [ $# -eq 1 ] | |
then | |
echo "You must pass the path to file with the list and the path to directory to check files. \nsh check-file-exist-from-list.sh path/to/file path/to/directory" | |
exit 1 | |
fi | |
while read -r file; do |
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 sqlalchemy | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import sessionmaker, relationship, backref | |
from sqlalchemy.ext.associationproxy import association_proxy | |
import uuid | |
engine = sqlalchemy.create_engine('sqlite:///:memory:') | |
Base = declarative_base() | |
OlderNewer