Skip to content

Instantly share code, notes, and snippets.

View timeout.js
const thundra = require("@thundra/core")();
exports.handler_blocking = thundra((event, context, callback) => {
setTimeout(function () {
callback(null, {msg: event});
}, 5000);
while (true);
});
@tomaszczerminski
tomaszczerminski / .travis.yml
Created May 24, 2019 — forked from y0ssar1an/.travis.yml
Example .travis.yml for Golang
View .travis.yml
# use the latest ubuntu environment (18.04) available on travis
dist: xenial
language: go
# Force-enable Go modules. Also force go to use the code in vendor/
# These will both be unnecessary when Go 1.13 lands.
env:
- GO111MODULE=on
- GOFLAGS='-mod vendor'
View cloth_on_table_no_friciton.scn
<Node name="root" dt="0.05" gravity="0 -9.810 0">
<VisualStyle displayFlags="hideBehaviorModels hideCollisionModels hideMappings hideForceFields showVisualModels" />
<RequiredPlugin name='SofaMiscCollision'/>
<LCPConstraintSolver maxIt="1000" tolerance="1e-6" initial_guess="false" build_lcp="true" multi_grid="false" printLog="0" mu="0.9"/>
<FreeMotionAnimationLoop solveVelocityConstraintFirst="1" />
<CollisionPipeline depth="15" verbose="0" draw="0" />
<BruteForceDetection name="N2" />
<LocalMinDistance name="Proximity" alarmDistance="0.3" contactDistance="0.1" useLMDFilters="0" />
<CollisionResponse name="Response" response="FrictionContact" />
<DiscreteIntersection/>
View wordpress-setup
sudo yum update -y
---update server
sudo yum install httpd -y
---install apache
@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created May 24, 2019
deskpins v1.32.1 - Passed - Package Tests Results
View 1.RegistrySnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-1953236517-242735908-2433092285-500</user>
<keys>
<key installerType="Nsis" displayName="DeskPins" displayVersion="1.32">
<RegistryView>Registry32</RegistryView>
<KeyPath>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DeskPins</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[C:\Program Files (x86)\DeskPins]]></InstallLocation>
<UninstallString><![CDATA["C:\Program Files (x86)\DeskPins\uninst.exe"]]></UninstallString>
@alifa98
alifa98 / center.java
Created May 24, 2019
How to center a Jframe in swing
View center.java
jframe.setLocationRelativeTo(null); //this should be done after setting the size or calling pack(), but before setting it visible, like this:
/*
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
*/
@alainpham
alainpham / arch-install-OKD.md
Created May 24, 2019
Install OKD on archlinux
View arch-install-OKD.md

qemu-img create -f qcow2 arch.qcow2 120G

@christianascone
christianascone / sidechain-bridge-setup.py
Created May 24, 2019
Simple python script to setup .env files for poa token bridge (https://poa.network/bridge)
View sidechain-bridge-setup.py
bridge_token_env = "sidechain-bridge-project/bridge_token/.env"
bridge_contract_env = "sidechain-bridge-project/bridge-contracts/deploy/.env"
bridge_oracle_env = "sidechain-bridge-project/bridge-oracle/.env"
bridge_ui_env = "sidechain-bridge-project/bridge-ui/.env"
def replace_dotenv_value(filename, start_version_identifier, value):
content = ""
start_version_identifier = "{}=".format(start_version_identifier)
with open(filename, "r") as env:
for line in env:
You can’t perform that action at this time.