Skip to content

Instantly share code, notes, and snippets.

View delirehberi's full-sized avatar
🏍️
§

Emre YILMAZ delirehberi

🏍️
§
View GitHub Profile
@joelonsql
joelonsql / JOIN FOREIGN.md
Last active February 8, 2023 23:29
SQL language proposal: JOIN FOREIGN

SQL language proposal: JOIN FOREIGN

The idea is to improve the SQL language, specifically the join syntax, for the special but common case when joining on foreign key columns.

The problem

Example below taken from PostgreSQL documentation [1]

In SQL-89, we didn't have any JOIN syntax yet, so queries were written in this way:

# SD card setup guide
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
# Download latest version
wget https://downloads.raspberrypi.org/raspbian_lite_latest
# Create empty file named ssh under boot folder to enable SSH support
touch ssh
# Create wifi connection detail file under boot folder
@streetturtle
streetturtle / sp
Last active February 9, 2025 13:31 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@sophia-ooo
sophia-ooo / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@mahmoudimus
mahmoudimus / cron_helper.sh
Created October 17, 2015 13:11 — forked from liquidgecka/cron_helper.sh
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@liquidgecka
liquidgecka / cron_helper.sh
Last active September 28, 2023 15:35
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@insin
insin / contactform.js
Last active June 21, 2025 08:07
React contact form example
/** @jsx React.DOM */
var STATES = [
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI',
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS',
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR',
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
]
var Example = React.createClass({
@gmccreight
gmccreight / master.vim
Last active November 21, 2024 14:36
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@muhittin
muhittin / setup.sh
Created November 4, 2013 15:48
Setup shell
#!/bin/sh
hosts_config(){
hosts_file=/private/etc/hosts
echo "\n127.0.0.1 $1\n">>$hosts_file
echo "Hosts file was updated."
}
apache_config(){
site_name=$1
@aTei
aTei / jquery_plugin_template.coffee
Last active December 19, 2015 02:28
jQuery plugin as CoffeeScript class template
class PluginClass
constructor: (@target) ->
_this = @ # to access Class inside @target.each and not modificate @ inside @target.each
eventData = {_class: _this} # to access Class inside event handlers
@target.each ->
self = $(@)
self.on 'click', eventData, _this.submitHandler
submitHandler: (e)->
_this = e.data._classs
e.preventDefault()