Skip to content

Instantly share code, notes, and snippets.

View simonneutert's full-sized avatar
🌻
'); DROP TABLE tanks;--

Simon Neutert simonneutert

🌻
'); DROP TABLE tanks;--
View GitHub Profile
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@greyscaled
greyscaled / README.md
Last active September 19, 2022 08:59
Sequelize + Express + Migrations + Seed Starter
@Krizzzn
Krizzzn / sid.js
Last active May 24, 2024 09:57 — forked from vesse/sid.coffee
Convert binary buffer object SID to string
/*
# Convert binary encoded object SID to a string
# (eg. S-1-5-21-1004336348-1177238915-682003330-512)
#
# SID format: https://technet.microsoft.com/en-us/library/cc962011.aspx
#
# ldapjs `searchEntry` has attribute `raw` that holds the raw
# values, including the `objectSid` buffer when one exists. Pass that
# buffer to get the string representation that can then be easily
# used in LDAP search filters, for example.
@rjz
rjz / ngrok_hostname.sh
Created August 9, 2016 16:20
Get ngrok hostname from command line
#!/bin/sh
# ngrok's web interface is HTML, but configuration is bootstrapped as a JSON
# string. We can hack out the forwarded hostname by extracting the next
# `*.ngrok.io` string from the JSON
#
# Brittle as all get out--YMMV. If you're still reading, usage is:
#
# $ ./ngrok_hostname.sh <proto> <addr>
#
@nickbalch
nickbalch / download_flickr_group.py
Last active August 9, 2022 07:36 — forked from Jarvl/download_flickr_set.py
Python scripts for downloading and maintaining flickr images from a group or set into a subfolder, then generating a RSS feed from a folder that could contain the downloaded flickr folder and/or additional images from elsewhere. Resulting file can be served up by any webserver to (for example) a LCD picture frame that can accept RSS feeds. RSS g…
#!/usr/bin/env python
# import libraries
#import sys
import datetime
import time
import random
import flickrapi
import requests
#!/usr/bin/env python
import flickrapi
import requests
import os
import re
FLICKR_KEY = "your api key"
FLICKR_SECRET = "your api secret"
USER_ID = "your user id"
@ssaunier
ssaunier / attachinary_setup.md
Last active March 27, 2020 18:01
Attachinary Setup in Rails 5

Attachinary Setup

First add the following gems to your Gemfile:

# Gemfile
gem "attachinary"
gem "jquery-fileupload-rails"
gem "coffee-rails"
@ummahusla
ummahusla / git-overwrite-branch.sh
Last active September 5, 2024 13:48 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name