Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@bardware
bardware / tweets.sql
Last active July 16, 2017 12:52
Import tweets.csv into MySQL DB
CREATE TABLE `tweets` (
`tweet_id` bigint(11) NOT NULL,
`in_reply_to_status_id` bigint(11) NOT NULL,
`in_reply_to_user_id` bigint(11) NOT NULL,
`timestamp` varchar(100) COLLATE utf8mb4_german2_ci NOT NULL,
`source` varchar(4000) COLLATE utf8mb4_german2_ci NOT NULL,
`text` varchar(4000) COLLATE utf8mb4_german2_ci DEFAULT NULL,
`retweeted_status_id` bigint(11) DEFAULT NULL,
`retweeted_status_user_id` bigint(11) DEFAULT NULL,
`retweeted_status_timestamp` bigint(11) DEFAULT NULL,
{
"parser" : "espree",
"env" : {
"browser" : true,
"jquery" : true
},
"rules" : {
"no-alert" : "off",
"no-array-constructor" : "warn",
"no-bitwise" : "off",
<cfscript>
qryPers = QueryNew(
'pn_id,vor name,nach name',
'integer,varchar,varchar',
[
{ pn_id = 2, 'vor name' = 'L', "nach name" = "y" },
{ pn_id = 1, 'vor name' = 'A', "nach name" = "b" }
]
);
qryPersSort = QueryExecute(
<cfset test = new MyTest() />
<cfset test.newMethod() />
component accessors="true" {
property name="privateVarOne" default="privateVarOne default";
function init() {
return this;
}
public void function newMethod() {
var myVar = variables.privateVarOne;
@bardware
bardware / Exception Stack Trace
Last active March 16, 2017 16:56
Unhandled event loop exception
org.eclipse.swt.SWTException: Failed to execute runnable (java.util.ConcurrentModificationException)
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
# Inspired by https://wiki.filezilla-project.org/wiki/index.php?title=Compiling_FileZilla_3_under_Windows&redirect=no
# pthread tendy to link dynamically, I prefer it statically linked
# Fix missing platform prefix for windres
[ -f /mingw64/bin/x86_64-w64-mingw32-windres.exe ] || ln -s /mingw64/bin/windres.exe /mingw64/bin/x86_64-w64-mingw32-windres.exe
[ -f /mingw32/bin/i686-w64-mingw32-windres.exe ] || ln -s /mingw32/bin/windres.exe /mingw32/bin/i686-w64-mingw32-windres.exe
# Even when statically linking to libstdc++, it still tries to dynamically link to lib(win)pthread. On top of it, libtool is too
# stupid to recognize the semantics of -Wl,-Bstatic. This leaves one option: Removing the dynamic import libraries.
rm /mingw32/i686-w64-mingw32/lib/libpthread.dll.a
rm /mingw32/i686-w64-mingw32/lib/libwinpthread.dll.a
LFLAGS="-static-libstdc++ -static-libgcc" CXXFLAGS="-static-libgcc -static-libstdc++" CC="gcc -Wall" make clean all V=1
@bardware
bardware / stacktrace.log
Created June 24, 2016 09:57
An internal error occurred during: "Requesting JavaScript AST from selection".
java.lang.ClassCastException: org.eclipse.wst.jsdt.internal.core.dom.binding.FunctionBinding cannot be cast to org.eclipse.wst.jsdt.core.dom.IVariableBinding
at org.eclipse.wst.jsdt.core.dom.BindingResolverDom.resolveVariable(BindingResolverDom.java:245)
at org.eclipse.wst.jsdt.core.dom.VariableDeclaration.resolveBinding(VariableDeclaration.java:198)
at org.eclipse.wst.jsdt.internal.ui.search.OccurrencesFinder.visit(OccurrencesFinder.java:228)
at org.eclipse.wst.jsdt.core.dom.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:224)
at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2499)
at org.eclipse.wst.jsdt.core.dom.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:320)
at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2499)
@bardware
bardware / .eslintrc
Created June 4, 2016 22:50 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names